From 6c3ceaae36deb08d5daff8b07afa02405b591682 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Sun, 9 Feb 2020 15:16:59 +0100 Subject: [PATCH] Printing socket exception to console --- src/main/java/com/jenkov/nioserver/SocketProcessor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/jenkov/nioserver/SocketProcessor.java b/src/main/java/com/jenkov/nioserver/SocketProcessor.java index 3bfadc0..92ad574 100644 --- a/src/main/java/com/jenkov/nioserver/SocketProcessor.java +++ b/src/main/java/com/jenkov/nioserver/SocketProcessor.java @@ -140,6 +140,8 @@ public class SocketProcessor implements Runnable { fullMessages.clear(); } } catch (IOException e) { + e.printStackTrace(); + System.err.println("An exception occurred while reading from a socket. Cancelling socket..."); cancelled = true; } finally { if (cancelled || socket.endOfStreamReached) {