Skip to content

Commit

Permalink
Merge pull request #2194 from AnuGayan/master
Browse files Browse the repository at this point in the history
Make connection reset error log a debug log
  • Loading branch information
arunans23 authored Jul 11, 2024
2 parents 18341e1 + 38f50ed commit ccd921b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void exception(final NHttpServerConnection conn, final Exception ex) {
msg = "";
}
if (ex instanceof ConnectionClosedException ||
msg.contains("Connection reset by peer") ||
msg.contains("Connection reset") ||
msg.contains("forcibly closed")) {
if (this.log.isDebugEnabled()) {
this.log.debug(conn + ": " + msg +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ public void exception(NHttpServerConnection conn, Exception e) {
commitResponseHideExceptions(conn, response);
} catch (Exception ignore) {}
} else if (e instanceof ConnectionClosedException || (e.getMessage() != null &&
(e.getMessage().contains("Connection reset by peer") ||
(e.getMessage().contains("Connection reset") ||
e.getMessage().contains("forcibly closed")))) {
if (log.isDebugEnabled()) {
errMsg = "I/O error (Probably the keepalive connection " +
Expand Down Expand Up @@ -658,7 +658,7 @@ public void exception(NHttpServerConnection conn, IOException e) {
String errMsg = "I/O error : " + e.getMessage();

if (e instanceof ConnectionClosedException || (e.getMessage() != null &&
(e.getMessage().contains("Connection reset by peer") ||
(e.getMessage().contains("Connection reset") ||
e.getMessage().contains("forcibly closed")))) {
if (log.isDebugEnabled()) {
errMsg = "I/O error (Probably the keepalive connection " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ public void logIOException(NHttpServerConnection conn, IOException e) {
return;
}
if (e instanceof ConnectionClosedException || (e.getMessage() != null && (
e.getMessage().toLowerCase().contains("connection reset by peer") ||
e.getMessage().toLowerCase().contains("connection reset") ||
e.getMessage().toLowerCase().contains("forcibly closed")))) {
if (log.isDebugEnabled()) {
log.debug(conn + ": I/O error (Probably the keepalive connection "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ private void logIOException(NHttpClientConnection conn, IOException e) {
String message = getErrorMessage("I/O error : " + e.getMessage(), conn);

if (e.getMessage() != null && (e instanceof ConnectionClosedException
|| e.getMessage().toLowerCase().contains("connection reset by peer")
|| e.getMessage().toLowerCase().contains("connection reset")
|| e.getMessage().toLowerCase().contains("forcibly closed"))) {
if (log.isDebugEnabled()) {
log.debug(conn + ": I/O error (Probably the keep-alive connection "
Expand Down

0 comments on commit ccd921b

Please sign in to comment.