Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6107

Broadcast onClose event regardless of the JSR 356 WebSocket connection closed state

    XMLWordPrintableJSON

Details

    Description

      When is a WebSocket connection closed, the org.apache.wicket.protocol.ws.javax.WicketEndpoint.onClose() is called. This will in turn broadcast an event message to a page that is bound to that connection. The problem is when the connection is set to the closed state before calling this method - then the event is not broadcasted. See org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.broadcastMessage() where is checked if the connection is open.

      If a client (developer) of the wicket's WebSocket API need to know when a connection is closed, there is no chance in the scenario above.

      I would suggest to let the AbstractWebSocketProcessor broadcast the ClosedMessage even if the connection is closed.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              jan-krakora Jan Krakora
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: