From 34016f849b44a147f3b0de5c89e6a0bec20d410f Mon Sep 17 00:00:00 2001 From: alina sireneva Date: Mon, 24 Jun 2024 00:39:51 +0300 Subject: [PATCH] fix(core): silently fail on AUTH_KEY_UNREGISTERED in updates.getState --- packages/core/src/network/session-connection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/network/session-connection.ts b/packages/core/src/network/session-connection.ts index 1b6916a5..b7bdd340 100644 --- a/packages/core/src/network/session-connection.ts +++ b/packages/core/src/network/session-connection.ts @@ -269,7 +269,7 @@ export class SessionConnection extends PersistentConnection { // we must send some user-related rpc to the server to make sure that // it will send us updates this.sendRpc({ _: 'updates.getState' }).catch((err: any) => { - if (this._destroyed) return // silently fail + if (this._destroyed || tl.RpcError.is(err, 'AUTH_KEY_UNREGISTERED')) return // silently fail this.log.warn('failed to send updates.getState: %s', err.text || err.message) }) }