https://bz.apache.org/bugzilla/show_bug.cgi?id=59238

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Bizarre as it may seem, Tomcat's behaviour is consistent with the Java
WebSocket specification.

2.1.5 requires that onClose() is invoked as a result of calling
session.close(). Before onClose() is invoked, the WebSocket close message is
sent to the peer. However, it is not a requirement to wait for the peer to
respond with a close message before invoking onClose().

The following sequence of events is therefore possible.
App calls session.onClose()
Close msg sent to peer
App sees onClose() invoked
Peer sends normal msg*
Peer receives close msg
Peer sends on close msg
App sees onMessage for msg*

There looks to be a case for separate local and remote onClose events. If you
want to pursue that, you should open an issue against the WebSocket spec:
https://java.net/jira/browse/WEBSOCKET_SPEC

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to