Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3704

WebSocket Sessions must be manually closed

XMLWordPrintable

      Currently if a WebSocket session goes inactive due to the browser shutting down or the user closing a tab the browser does not send a close event to the server. This behavior seems the same with Chrome and IE.

      The underlying TCP socket is however inactive and can be confirmed by calling a Session#isOpen which returns false. This will cause a build up of sessions unless the user does something like

       for (Session session : sessions) {
          if (!session.isOpen()) {
             session.close();
         }
      }
      

      This would need to be done periodically by the application. Shouldn't the server automatically close these sessions when the underlying socket goes inactive?

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              cody.lerum@gmail.com Cody Lerum
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: