diff options
Diffstat (limited to 'src/IvyClient.java')
-rwxr-xr-x | src/IvyClient.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/IvyClient.java b/src/IvyClient.java index d98bb0f..1556930 100755 --- a/src/IvyClient.java +++ b/src/IvyClient.java @@ -19,6 +19,10 @@ import gnu.regexp.*; * created for each remote client. * * CHANGELOG: + * 1.2.2: + * - cleared a bug causing the CPU to be eating when a remote client left the + * bus. closes Damien Figarol bug reported on december, 2002. It is handled + * in the readline() thread * 1.2.1: * - removes a NullPointerException when stops pinging on a pinger that * wasn't even started @@ -187,11 +191,15 @@ public class IvyClient implements Runnable { Thread thisThread = Thread.currentThread(); traceDebug("Connected from "+ socket.getInetAddress().getHostName()+ ":"+socket.getPort()); String msg = null; + // System.out.println("IvyClient Thread started"); // THREADDEBUG while ( clientThread==thisThread ) { try { if ((msg=in.readLine()) != null ) { if (doping && (pingerThread!=null)) pingerThread.interrupt(); newParseMsg(msg); + } else { + traceDebug("readline null ! leaving the thead"); + break; } } catch (IvyException ie) { ie.printStackTrace(); @@ -200,11 +208,11 @@ public class IvyClient implements Runnable { if (thisThread!=clientThread) break; } catch (IOException e) { if (clientThread!=thisThread) break; - traceDebug("abnormally Disconnected from "+ - socket.getInetAddress().getHostName()+":"+socket.getPort()); + System.out.println("abnormally Disconnected from "+ socket.getInetAddress().getHostName()+":"+socket.getPort()); } } // while traceDebug("normally Disconnected from "+ appName); + // System.out.println("IvyClient Thread stopped"); // THREADDEBUG } private void sendBuffer( String buffer ) throws IvyException { @@ -420,6 +428,7 @@ public class IvyClient implements Runnable { boolean isPinging = false; public void run() { isPinging=true; + // System.out.println("Pinger Thread started"); // THREADDEBUG while (isPinging) { try { Thread.sleep(PINGTIMEOUT); @@ -427,6 +436,7 @@ public class IvyClient implements Runnable { } catch (InterruptedException ie) { } } + // System.out.println("Pinger Thread stopped"); // THREADDEBUG } public void stopPinging() { isPinging=false; pingerThread.interrupt();} } |