Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-36871] Don't spam the logs with warnings for closed I/O or r…
…efused connections
  • Loading branch information
stephenc committed Aug 3, 2016
1 parent 8bb6354 commit a6e45c5
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -19,6 +19,7 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.security.GeneralSecurityException;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicReference;
Expand Down Expand Up @@ -135,6 +136,16 @@ public void onRecv(@NonNull ByteBuffer readBuffer) throws IOException {
LOGGER.log(Level.SEVERE, "[" + stack().name() + "] ", e);
}
abort(e);
} catch (ClosedChannelException e) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "[" + stack().name() + "] ", e);
}
return;
} catch (ConnectionRefusalException e) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "[" + stack().name() + "] ", e);
}
return;
} catch (IOException e) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, "[" + stack().name() + "] ", e);
Expand Down

0 comments on commit a6e45c5

Please sign in to comment.