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}]`
|
`SocketManager: connecting unauthenticated socket, transport option [${transportOption}]`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let process: AbortableProcess<IWebSocketResource>;
|
||||||
|
|
||||||
if (transportOption === TransportOption.Libsignal) {
|
if (transportOption === TransportOption.Libsignal) {
|
||||||
this.unauthenticated = this.connectLibsignalUnauthenticated();
|
process = this.connectLibsignalUnauthenticated();
|
||||||
return this.unauthenticated.getResult();
|
} 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;
|
this.unauthenticated = process;
|
||||||
|
|
||||||
let unauthenticated: IWebSocketResource;
|
let unauthenticated: IWebSocketResource;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue