From ff81625e46b61dbf198bd84feee8fe7c6e5f8caa Mon Sep 17 00:00:00 2001 From: Simon Woolf Date: Mon, 24 Jun 2024 16:43:56 +0100 Subject: [PATCH] Fix RTL13a (stop auto-attaching from inappropriate states) --- src/common/lib/client/realtimechannel.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/lib/client/realtimechannel.ts b/src/common/lib/client/realtimechannel.ts index e0a561492..396374875 100644 --- a/src/common/lib/client/realtimechannel.ts +++ b/src/common/lib/client/realtimechannel.ts @@ -539,9 +539,11 @@ class RealtimeChannel extends EventEmitter { * attaching, go into suspended, fail messages, and wait a few seconds * before retrying */ this.notifyState('suspended', detachErr); - } else { + } else if (this.state === 'attached' || this.state === 'suspended') { + // RTL13a this.requestState('attaching', detachErr); } + // else no action (detached in initialized, detached, or failed state is a noop) break; }