code: @Override
      public void afterConnectionClosed(final WebSocketSession webSocketSession, final CloseStatus status) {
          logger.debug("[afterConnectionClosed] id = ", webSocketSession.getId());
          this.session = null;
  
          if (connectionListener != null) {
              connectionListener.onConnectionClosed();
          }
      }
docs: Is called after a websocket session was closed.
  @param webSocketSession websocket session that was closed
  @param status status of the websocket session