Summary: | WebSocket client doesn't detect forceful connection failures | ||
---|---|---|---|
Product: | Tomcat 8 | Reporter: | palmercox |
Component: | WebSocket | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.0.20 | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | All |
Description
palmercox
2015-03-26 00:32:07 UTC
I tested this on Tomcat 8.0.20. The NIO2 code that the client uses looks ok to me (WsFrameClient) and should work unless there's a JVM or platform issue. If the JVM doesn't report that the socket is gone using the failed of the completion handler, then nothing is going to happen and it would be the behavior you see. Although this should be tested to make sure this is indeed the explanation, it's possible there's no Tomcat bug to fix here. For reference, I tested on Mac OS X 10.10.2 and Java 1.8.0_40. I haven't had a chance to check if there is a JVM issue. Interesting. The NIO2 code reports a dropped connection as a successful read for EOF. Not what was expected. This is now correctly handled in trunk, 8.0.x (for 8.0.22 onwards) and 7.0.x (for 7.0.62 onwards). |