ably / ably-chat-js

Ably Chat SDK for JavaScript to build chat experiences at scale
https://ably-livestream-chat-demo.vercel.app/
Apache License 2.0
8 stars 0 forks source link

[RoomLifeCycleManager] `_operationInProgress` flag incorrectly set #406

Open sacOO7 opened 3 hours ago

sacOO7 commented 3 hours ago
sacOO7 commented 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.

sacOO7 commented 3 hours ago

I mean, the flag can be simply set to true before starting mtx and set to false after mtx op ends.

sacOO7 commented 2 hours ago

Btw, if operationInProgress is only meant for Attach op, we should update doc + variable name for the same.