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

Tom Tom (JIRA) issues at jboss.org
Thu Mar 13 07:48:11 EDT 2014


Tom Tom created WFLY-3109:
-----------------------------

             Summary: 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


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