Skip to content

Commit

Permalink
Warn connection unexpectedly closed (#146)
Browse files Browse the repository at this point in the history
Motivation:
To enhance the debugging experience, warning when a connection is
unexpectedly closed.

Modifications:
Changed the log level to "warn" for unexpected connection closures

Result:
Improved log
  • Loading branch information
jchrys authored Sep 18, 2023
1 parent 878210d commit 124a8d8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ private void handleClose() {
STATE_UPDATER.set(this, ST_CLOSED);

if (oldState != ST_CLOSING) {
logger.debug("Connection has been closed by peer");
logger.warn("Connection unexpectedly closed");
drainError(ClientExceptions.unexpectedClosed());
} else {
logger.debug("Connection has been closed");
logger.debug("Connection closed");
drainError(ClientExceptions.expectedClosed());
}
}
Expand Down

0 comments on commit 124a8d8

Please sign in to comment.