Skip to content

Commit

Permalink
Do not remove Openems Session anymore on websocket close
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Sep 22, 2017
1 parent 2d06cb6 commit 98a2837
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@ protected void _onOpen(WebSocket websocket, ClientHandshake handshake) {
}

/**
* Close event of websocket. Removes the session and the websocket.
* Close event of websocket. Removes the session.
*/
@Override
public void onClose(WebSocket websocket, int code, String reason, boolean remote) {
OpenemsSession session = this.websockets.get(websocket);
sessionManager.removeSession(session);
super.onClose(websocket, code, reason, remote);
public void _onClose(WebSocket websocket, Optional<OpenemsSession> sessionOpt) {
if (sessionOpt.isPresent()) {
log.info("Would remove the session... " + sessionOpt.get());
// TODO sessionManager.removeSession(sessionOpt.get());
}
}

/**
Expand Down

0 comments on commit 98a2837

Please sign in to comment.