Ensure unauthenticated websocket reconnects if using LibSignal's transport
This commit is contained in:
@@ -592,12 +592,12 @@ export class SocketManager extends EventListener {
|
|||||||
`SocketManager: connecting unauthenticated socket, transport option [${transportOption}]`
|
`SocketManager: connecting unauthenticated socket, transport option [${transportOption}]`
|
||||||
);
|
);
|
||||||
|
|
||||||
if (transportOption === TransportOption.Libsignal) {
|
let process: AbortableProcess<IWebSocketResource>;
|
||||||
this.unauthenticated = this.connectLibsignalUnauthenticated();
|
|
||||||
return this.unauthenticated.getResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
const process = this.connectResource({
|
if (transportOption === TransportOption.Libsignal) {
|
||||||
|
process = this.connectLibsignalUnauthenticated();
|
||||||
|
} else {
|
||||||
|
process = this.connectResource({
|
||||||
name: UNAUTHENTICATED_CHANNEL_NAME,
|
name: UNAUTHENTICATED_CHANNEL_NAME,
|
||||||
path: '/v1/websocket/',
|
path: '/v1/websocket/',
|
||||||
proxyAgent,
|
proxyAgent,
|
||||||
@@ -607,6 +607,8 @@ export class SocketManager extends EventListener {
|
|||||||
transportOption,
|
transportOption,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.unauthenticated = process;
|
this.unauthenticated = process;
|
||||||
|
|
||||||
let unauthenticated: IWebSocketResource;
|
let unauthenticated: IWebSocketResource;
|
||||||
|
Reference in New Issue
Block a user