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,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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue