You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test Case:
when disconnect the network : (1)elapsed time 30 second and i send message ,continue to (2) elapsed time 150 second(2 minute 30 second) and i send message
Recovery the network in elapsed time 3 minute , it still can send ( elapsed time 150 second) over time -maxDisconnectionDuration message to another client.
My question:
why does it over maxDisconnectionDuration time , it still can send message and client be received message???
On the client side, the messages are buffered during disconnection, and will be sent upon reconnection.
On the server side, if connection state recovery is enabled, the messages are buffered while the client is disconnected, up to the maxDisconnectionDuration value.
Describe the bug
recovery function : maxDisconnectionDuration is not work
To Reproduce
i use official way:
https://socket.io/docs/v4/connection-state-recovery
i write a sample code :
https://codesandbox.io/p/devbox/github/socketio/chat-example/tree/cjs/step6?file=%2Findex.js%3A9%2C3-9%2C26
set parameter:
maxDisconnectionDuration: 2 * 60 * 1000 (2 minute)
skipMiddlewares: true
Test Case:
when disconnect the network : (1)elapsed time 30 second and i send message ,continue to (2) elapsed time 150 second(2 minute 30 second) and i send message
Recovery the network in elapsed time 3 minute , it still can send ( elapsed time 150 second) over time -maxDisconnectionDuration message to another client.
My question:
why does it over maxDisconnectionDuration time , it still can send message and client be received message???
Please fill the following code example:
https://codesandbox.io/p/devbox/github/socketio/chat-example/tree/cjs/step6?file=%2Findex.js%3A9%2C3-9%2C26
(but i set parameter below:
connectionStateRecovery: {
// the backup duration of the sessions and the packets
maxDisconnectionDuration: 2 * 60 * 1000,
// whether to skip middlewares upon successful recovery
skipMiddlewares: true,
}
)
Socket.IO server version:
4.7.5
Server
Socket.IO client version:
4.7.5
Client
Expected behavior
when disconnect time is over 2 minute, i send the message .
the messge should not be received by another client.
Platform:
Additional context
whatever maxDisconnectionDuration is 1 min, 2 min ,5 min ; all over-time message can be received by another client.
The text was updated successfully, but these errors were encountered: