From: David ‘Bombe’ Roden Date: Mon, 18 Mar 2013 12:55:35 +0000 (+0100) Subject: Log exactly which part of the connection has died. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fb2178b2db851feccfb1a8c278f95b3c2e368cba;p=sonitus.git Log exactly which part of the connection has died. --- diff --git a/src/main/java/net/pterodactylus/sonitus/data/Connection.java b/src/main/java/net/pterodactylus/sonitus/data/Connection.java index 8ea1a55..169bfa5 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/Connection.java +++ b/src/main/java/net/pterodactylus/sonitus/data/Connection.java @@ -56,8 +56,14 @@ public abstract class Connection implements Runnable { @Override public void run() { while (true) { + byte[] buffer = null; + try { + buffer = source.get(bufferSize()); + } catch (IOException ioe1) { + logger.log(Level.WARNING, "Source died!", ioe1); + break; + } try { - byte[] buffer = source.get(bufferSize()); feed(buffer); } catch (IOException ioe1) { logger.log(Level.WARNING, "Sink died!", ioe1);