Skip to content

Commit 9f114b9

Browse files
committed
docs: mention queueuing messages when no response
1 parent 092dde6 commit 9f114b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/flow/advanced/server-client-communication.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The `syncId` is always incremented by 1 after a new UIDL response is generated.
2727

2828
=== clientId
2929

30-
The `clientId` holds the latest communication state identifier given by the client. The client token is incremented on the client after sending the message. The server increments the value in the response to match the next expected `clientId` (i.e., client updated after message sent).
30+
The `clientId` holds the latest communication state identifier given by the client. The client token is incremented on the client after sending the message, but only if the client has already received a response from the server to the previously sent message. Until this response has been received, the client will attempt to resend the message until some kind of response is received, and the messages generated during that time are placed in a queue to wait. Once the server has received the message from the client, it increments the token value in the response to match the next expected `clientId` (i.e., client updated after message sent).
3131

3232
On the client, pending messages are removed from the queue as handled when `clientId` from server matches the next expected value. If the id is less than expected, the client waits since the server has not yet seen all messages. The response should arrive later. Otherwise, the client trusts the server and updates the id to the server's expectations.
3333

0 commit comments

Comments
 (0)