Ensure unauthenticated websocket reconnects if using LibSignal's transport

This commit is contained in:
trevor-signal
2024-04-18 13:00:16 -04:00
committed by GitHub
parent 97f5430541
commit ec2a17a0e4

View File

@@ -592,12 +592,12 @@ export class SocketManager extends EventListener {
`SocketManager: connecting unauthenticated socket, transport option [${transportOption}]`
);
if (transportOption === TransportOption.Libsignal) {
this.unauthenticated = this.connectLibsignalUnauthenticated();
return this.unauthenticated.getResult();
}
let process: AbortableProcess<IWebSocketResource>;
const process = this.connectResource({
if (transportOption === TransportOption.Libsignal) {
process = this.connectLibsignalUnauthenticated();
} else {
process = this.connectResource({
name: UNAUTHENTICATED_CHANNEL_NAME,
path: '/v1/websocket/',
proxyAgent,
@@ -607,6 +607,8 @@ export class SocketManager extends EventListener {
transportOption,
},
});
}
this.unauthenticated = process;
let unauthenticated: IWebSocketResource;