Skip to content

Commit

Permalink
Fix RTL13a (stop auto-attaching from inappropriate states)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonWoolf committed Jun 24, 2024
1 parent 5de39d2 commit ff81625
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/lib/client/realtimechannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ff81625

Please sign in to comment.