Monday, 26 November 2018

Socket.io recovery from disconnections

I have a chat with a server and a client in Socket.io. The client sends and receives messages to/from the server. I pull out my Ethernet plug on the client and the connection is broken. Then I reattach the plug.

After that sending messages from the client still works just fine and all previously sent messages during disconnection are resent successfully. Good, this is what I expect, both on Chrome and Firefox.

As for receiving, it is also OK for Chrome but is not for Firefox. Firefox won't receive messages from the server anymore, only send them.

The question is what do I do to properly handle such network problems and make my chat robust?



from Socket.io recovery from disconnections

No comments:

Post a Comment