Spec requirement
RTL5k: If the channel receives an ATTACHED message while in the DETACHED state, it should send a new DETACH message to the server.
Current behaviour
ably-js re-enters the attached state instead of sending DETACH when an unsolicited ATTACHED is received while the channel is detached.
Reproduction
RUN_DEVIATIONS=1 npx mocha --no-config --require tsx/cjs 'test/uts/realtime/channels/channel_detach.test.ts' --timeout 30000 --grep "RTL5k - ATTACHED while detached sends DETACH"
UTS test
test/uts/realtime/channels/channel_detach.test.ts — asserts detachMessageCount == 2 and channel.state == 'detached'.
┆Issue is synchronized with this Jira Task by Unito
Spec requirement
RTL5k: If the channel receives an ATTACHED message while in the DETACHED state, it should send a new DETACH message to the server.
Current behaviour
ably-js re-enters the
attachedstate instead of sending DETACH when an unsolicited ATTACHED is received while the channel is detached.Reproduction
UTS test
test/uts/realtime/channels/channel_detach.test.ts— assertsdetachMessageCount == 2andchannel.state == 'detached'.┆Issue is synchronized with this Jira Task by Unito