how long will the server take to detect whether the client is disconnected?
how long will the server take to detect whether the client is disconnected? thank you.
Added by Artur Hefczyc over 4 years ago
Raylin lin wrote:
hi,all:how long will the server take to detect whether the client is disconnected? thank you.
Usually this is instant. However, some factors may contribute to extended time when the server does not know about the user being disconnected:
Bosh - the inactivity timeout determines how soon the server discovers a web user is gone, by default it is set to 10 seconds but many deployments set it to 60 seconds or even longer
Mobile devices is another story, mobile providers periodically cleanup all TCP/IP connections, even non-idle connections and they do it in such a way that neither the mobile device or the server is notified about broken connection. The Tigase server sends periodic whitespace pings which allow it to discover broken connection. This may take even up to 10 minutes
There are many other use cases which may cause the connection break and only one side (either the client or the server) knows about it and broken connection time varies from a one case to another.