You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/05/04 22:42:24 UTC

[Bug 54746] Cannot obtain idempotent information from Session in onError method after session closed

https://issues.apache.org/bugzilla/show_bug.cgi?id=54746

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
The final WebSocket spec is very clear on the required behaviour and this is
what Tomcat implements.

I've looked through the code and the only time I can find where
Endpoint.onError() is called after the session has been closed is if for the
following sequence of events:
- Server receives close message
- server fires session.onClose()
- session is marked as closed
- server echos close message back to the client
- the sending of that message fails

This is easily detected via the onOpen() method of the session and isn't -
given that as far as the app is concerned it was a normal shutdown - something
I am too concerned about. It could be argued that it would be reasonable in
this case to just swallow the error. It would be useful to get some clarity on
this from the EG but I don't see it as a bug issue.

I also took a look at how things like network errors are handled. In that case
onClose() is triggered with a suitable close code.

If you have a test case (other than the one above) that demonstrates onClose()
being called before onError() I'd be happy to take look. Just re-open this and
provide some steps to reproduce.

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

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