Skip to content

Commit

Permalink
Only remove first time handshake failures
Browse files Browse the repository at this point in the history
  • Loading branch information
berinhardt committed Jul 26, 2024
1 parent 08359a3 commit 17ed3a0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ private void closeClient(UUID sessionId, Channel channel) {
} catch (Throwable t) {
log.warn("Can't close channel for sessionId: {}", sessionId, t);
}
ClientHead clientHead = clientsBox.removeClient(sessionId);
clientHead.disconnect();
ClientHead clientHead = clientsBox.get(sessionId);
if (clientHead != null && clientHead.getNamespaces().isEmpty()) {
clientsBox.removeClient(sessionId);
clientHead.disconnect();
}
log.info("Client with sessionId: {} was disconnected", sessionId);
}

Expand Down

0 comments on commit 17ed3a0

Please sign in to comment.