Replies: 2 comments 3 replies
-
Ok. I just googled and apparently the reason is "a lot of reports from users that experience random disconnects due to ping timeout, After analysis, it seems to be caused by delayed timers on the client-side." according to this link: https://socket.io/blog/engine-io-4-release/ But I don't understand why switching to have server send ping would solve this. If this delayed timer problem is actually the case, wouldn't it be an issue in the javascript language itself or the browser, not with the socket.io protocol? |
Beta Was this translation helpful? Give feedback.
-
Hi!
I don't think it really matters in terms of performance. The only difference is an additional timer on the server side (one for the ping interval, and one for the ping timeout).
Yes, we had received reports of random ping timeouts due to delayed timers. This problem was exacerbated by a low Related:
This change was implemented in socketio/engine.io@31ff875, included in Reference: https://socket.io/docs/v4/migrating-from-2-x-to-3-0/ |
Beta Was this translation helpful? Give feedback.
-
So the current protocol the ping/pong mechanism is reversed unlike older versions. The server issues a ping and the client responds with a pong. Isn't it better for the client to issue a ping and server respond with pong for scalability? Why was it changed?
and another question, since which version was this change implemented?
Beta Was this translation helpful? Give feedback.
All reactions