Skip to content

Commit

Permalink
RTN11d: clarify that should reset msgSerial to 0 on reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonWoolf committed May 1, 2019
1 parent d2b4880 commit a812777
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion textile/features.textile
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ h3(#realtime-connection). Connection
** @(RTN11a)@ Explicitly connects to the Ably service if not already connected
** @(RTN11b)@ If the state is @CLOSING@, the client should make a new connection with a new transport instance and remove all references to the old one. In particular, it should make sure that, when the @CLOSED@ @ProtocolMessage@ arrives for the old connection, it doesn't affect the new one.
** @(RTN11c)@ If the state is @DISCONNECTED@ or @SUSPENDED@, aborts the retry process described in "RTN14d":#RTN14d and "RTN14e":#RTN14e and immediately tries to reconnect.
** @(RTN11d)@ If the state is @FAILED@, transitions all the channels to @INITIALIZED@, sets their @errorReason@ to @null@, and sets the connection's @errorReason@ to @null@.
** @(RTN11d)@ If the state is @CLOSED@ or @FAILED@, transitions all the channels to @INITIALIZED@ and unsets their @Channel.errorReason@, unsets the @Connection.errorReason@, clears all connection state (including in particular @Connection.recoveryKey@), and resets the @msgSerial@ to @0@
* @(RTN12)@ @Connection#close@ function:
** @(RTN12f)@ If the connection state is @CONNECTING@, moves immediately to @CLOSING@. If the connection attempt succeeds, ie. a @CONNECTED@ @ProtocolMessage@ arrives from Ably, then do as specified in "RTN12a":#RTN12a. If it doesn't succeed, move to @CLOSED@.
** @(RTN12a)@ If the connection state is @CONNECTED@, sends a @CLOSE@ @ProtocolMessage@ to the server, transitions the state to @CLOSING@ and waits for a @CLOSED@ @ProtocolMessage@ to be received
Expand Down

0 comments on commit a812777

Please sign in to comment.