Summary: | WebSocket does not get closed when network is disconnected | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | roman.stobnicki |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED DUPLICATE | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | 7.0.50 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
roman.stobnicki
2015-03-24 11:44:04 UTC
Which WebSocket implementation? Which connector? Depending on circumstances, Tomcat may not be informed of the network disconnection - in which case there is no way for Tomcat to call onClose(). I seem to recall markt doing some work on this recently: you (Mark) weren't able to replicate a network drop by disconnecting your VMs network, but physically pulling the Ethernet cable from your laptop seemed to do the trick. Could this have been fixed /post/ 7.0.50? Thanks Chris. I hadn't joined up those dots. *** This bug has been marked as a duplicate of bug 57546 *** (In reply to Mark Thomas from comment #3) > Thanks Chris. I hadn't joined up those dots. > > *** This bug has been marked as a duplicate of bug 57546 *** FTR, bug #57546 was fixed in 7.0.59. Please upgrade and re-test. Sorry for late replay but update emails were caught in my spam :-) Just wanted to add that actually we did many tests and found out that TCP keep alive timers are only good between the "hops" and not end to end. So, implementing some sort of Ping/Pong mechanism one level higher seems to be the only way to verify if the two ends can still talk to each other or not. The test: I have connected a Chrome client running on a laptop and called into my conferencing application running on ApacheTomcat. When connection was established after about 40 seconds I disconnected the network on the laptop and noticed that websocket was not notified that it was closed. If I attempted to send something to it at that moment then it will tell me that websocket no longer exists. Changing TCP keepalive timers on AS I could see them going back and forth from AS out and back... but did not see them on the client machine at all. That is what made me believe that these timer settings are only between the network hops. |