Skip to content
Permalink
Browse files
[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 a6e45c52a3643c2384a393e2ee8308853454f887
Showing 1 changed file with 11 additions and 0 deletions.
@@ -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;
@@ -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);

0 comments on commit a6e45c5

Please sign in to comment.