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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,