From 4fabfcf0f392f256122b9ac1aedb38ed82e9548f Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Fri, 7 Mar 2008 23:53:19 +0000 Subject: [PATCH] Resort to adding some temporary logging printouts to BlockingCommunicator to figure out what's keeping the reader thread from being shut down. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4964 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../presents/client/BlockingCommunicator.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/java/com/threerings/presents/client/BlockingCommunicator.java b/src/java/com/threerings/presents/client/BlockingCommunicator.java index 533bdceac..0a05b4de3 100644 --- a/src/java/com/threerings/presents/client/BlockingCommunicator.java +++ b/src/java/com/threerings/presents/client/BlockingCommunicator.java @@ -475,19 +475,29 @@ public class BlockingCommunicator extends Communicator // somebody set up us the bomb! we've been interrupted which means that we're being // shut down, so we just report it and return from iterate() like a good monkey Log.debug("Reader thread woken up in time to die."); + // TEMP + Log.info("Blocking Communicator: Caught a ClosedByInterruptException: " + cbie); } catch (InterruptedIOException iioe) { // somebody set up us the bomb! we've been interrupted which means that we're being // shut down, so we just report it and return from iterate() like a good monkey Log.debug("Reader thread woken up in time to die."); + // TEMP + Log.info("Blocking Communicator: Caught a InterruptedIOException: " + iioe); + } catch (EOFException eofe) { + // TEMP + Log.info("Blocking Communicator: Caught an EOFException: " + eofe); + // let the communicator know that our connection was closed connectionClosed(); // and shut ourselves down shutdown(); } catch (IOException ioe) { + // TEMP + Log.info("Blocking Communicator: Caught an IOException: " + ioe); // let the communicator know that our connection failed connectionFailed(ioe); // and shut ourselves down @@ -518,7 +528,10 @@ public class BlockingCommunicator extends Communicator // Note that we're the ones in control of the interruption, and then do it to get our // reader out of waiting for the rest of a readFrame if necessary. _interrupted = true; + Log.info("BlockingCommunicator: about to call interrupt"); interrupt(); + // TEMP + Log.info("BlockingCommunicator: called interrupt"); } }