Open sacOO7 opened 3 hours ago
Also, I feel operationInProgress
should be set to false
at the end of mtx
promise, not in between right?
Like in case of Attach
op, it's set in between,
https://github.com/ably/ably-chat-js/blob/533c4d0314bcce942a30b4d7d6a012c3b081420d/src/core/room-lifecycle-manager.ts#L592-L600
While we are still emitting discontinuity
events as a part of mutually exclusive/atomic attach op.
I mean, the flag can be simply set to true
before starting mtx
and set to false
after mtx
op ends.
Btw, if operationInProgress
is only meant for Attach
op, we should update doc + variable name for the same.
operationInProgress
flag is set to false only whenattach
operation finishes.false
at the end of other operations likeDetach
,Release
, andInternal
operations.operationInProgress
totrue
when the room has just initialized and not performing any operation.