Ensure unauthenticated websocket reconnects if using LibSignal's transport
This commit is contained in:
parent
97f5430541
commit
ec2a17a0e4
1 changed files with 14 additions and 12 deletions
|
@ -592,21 +592,23 @@ export class SocketManager extends EventListener {
|
|||
`SocketManager: connecting unauthenticated socket, transport option [${transportOption}]`
|
||||
);
|
||||
|
||||
let process: AbortableProcess<IWebSocketResource>;
|
||||
|
||||
if (transportOption === TransportOption.Libsignal) {
|
||||
this.unauthenticated = this.connectLibsignalUnauthenticated();
|
||||
return this.unauthenticated.getResult();
|
||||
process = this.connectLibsignalUnauthenticated();
|
||||
} else {
|
||||
process = this.connectResource({
|
||||
name: UNAUTHENTICATED_CHANNEL_NAME,
|
||||
path: '/v1/websocket/',
|
||||
proxyAgent,
|
||||
resourceOptions: {
|
||||
name: UNAUTHENTICATED_CHANNEL_NAME,
|
||||
keepalive: { path: '/v1/keepalive' },
|
||||
transportOption,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const process = this.connectResource({
|
||||
name: UNAUTHENTICATED_CHANNEL_NAME,
|
||||
path: '/v1/websocket/',
|
||||
proxyAgent,
|
||||
resourceOptions: {
|
||||
name: UNAUTHENTICATED_CHANNEL_NAME,
|
||||
keepalive: { path: '/v1/keepalive' },
|
||||
transportOption,
|
||||
},
|
||||
});
|
||||
this.unauthenticated = process;
|
||||
|
||||
let unauthenticated: IWebSocketResource;
|
||||
|
|
Loading…
Reference in a new issue