[jboss-jira] [JBoss JIRA] (WFLY-3109) CloseReason always null for WebSocket onClose methods

Stuart Douglas (JIRA) issues at jboss.org
Mon Apr 14 18:14:33 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-3109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12961784#comment-12961784 ] 

Stuart Douglas commented on WFLY-3109:
--------------------------------------

Fixed in upstream undertow. Not sure if this will make it into 8.1.0.Final or not though.
                
> CloseReason always null for WebSocket onClose methods
> -----------------------------------------------------
>
>                 Key: WFLY-3109
>                 URL: https://issues.jboss.org/browse/WFLY-3109
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 8.0.0.Final
>         Environment: WildFly 8.0.0.Final on Windows 7 Pro (64 bits) with JDK 7.0u51 (64 bits)
>            Reporter: Tom Tom
>            Assignee: Stuart Douglas
>
> The onClose method of the websocket endpoints does not receive valid CloseReason, it is always null.
> With GlassFish 4.0, the CloseReason is not null and correctly reflects the code and message used to close the wensocket from the client side.
> Simplified code sample of the endpoint:
> @ServerEndpoint(value = "/test", configurator = MyConfigurator.class)
> public class MyEndpoint {
>    // onOpen, onMessage and onError, LOGGER are omitted
>     @OnClose
>     public void onClose(Session session, CloseReason reason) {
>         LOGGER.debug("onClose(sessionId={}, reason={})", session.getId(), reason);
>     }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list