[ECO-4687][Protocol-2] Fix duplicate outgoing ATTACH msg#416
[ECO-4687][Protocol-2] Fix duplicate outgoing ATTACH msg#416sacOO7 merged 8 commits intofeature/integration-protocol-2from
Conversation
1. Send attach only when connection state is CONNECTED 2. Not queue attach message, instead send is immediately on connected 3. Removed use of emitter pattern while clearing attach/detach timers
1. Moved sending ATTACH msg as a part of separate codebase 2. DETEACH msg will be re-attempted on reconnection if pending timer exist 3. notify_state_change made accessible to channel_state_machine
|
I have updated implementation for sending |
|
I've tried taking a look at this PR but it's quite complicated and I don't really understand what's going on. Might be best to have a call about it. |
|
Recapping our call:
|
1. marked notify_state_change as accessible 2. annotated code with right spec ids
50395de to
07aadbd
Compare
is registering a callback on
|
Main issue was related to the fact that, every msg that needs to be sent is queued first in the global queue and then sent one by one. Since, protocol 2 supports sending force ATTACH on every connected msg, if there is existing ATTACH in queue, both of the ATTACH will be sent on CONNECTED -> https://github.com/ably/specification/pull/193/files
Fixed ably-ruby implementation responsible for sending duplicate ATTACH message.
Link to internal discussion
https://ably-real-time.slack.com/archives/C8SPU4589/p1718275991214299?thread_ts=1718115075.720879&cid=C8SPU4589 ( check for last few messages regarding decision taken )
PS. It will be easy to understand changes by going through each commit.