Hook up LibSignalWebsocketResource.forceKeepAlive

This commit is contained in:
Jordan Rose
2024-09-23 16:24:24 -07:00
committed by GitHub
parent f7420e0512
commit ba6e11614e
2 changed files with 100 additions and 44 deletions

View File

@@ -187,6 +187,7 @@ export class SocketManager extends EventListener {
this.queueOrHandleRequest(req);
},
receiveStories: !this.hasStoriesDisabled,
keepalive: { path: '/v1/keepalive' },
})
: this.connectResource({
name: AUTHENTICATED_CHANNEL_NAME,
@@ -628,6 +629,7 @@ export class SocketManager extends EventListener {
process = connectUnauthenticatedLibsignal({
libsignalNet: this.libsignalNet,
name: UNAUTHENTICATED_CHANNEL_NAME,
keepalive: { path: '/v1/keepalive' },
});
} else {
process = this.connectResource({
@@ -749,6 +751,7 @@ export class SocketManager extends EventListener {
const shadowingConnection = connectUnauthenticatedLibsignal({
libsignalNet: this.libsignalNet,
name: options.name,
keepalive: options.keepalive ?? {},
});
const shadowWrapper = async () => {
// if main connection results in an error,