Author: bdonlan
Date: 2005-01-14 16:07:21 -0500 (Fri, 14 Jan 2005)
New Revision: 598

Modified:
   trunk/misc/javer/
   trunk/misc/javer/src/javer/HaverClient.java
   trunk/misc/javer/src/javer/NonblockingOutputStream.java
Log:
 [EMAIL PROTECTED]:  bdonlan | 2005-01-14 16:05:49 -0500
 * NonBlockingOutputStream.java:
   Comment some debug prints
 * HaverClient.java:
   Comment some debug prints.
   Catch exceptions in run() so malformed messages don't crash us.



Property changes on: trunk/misc/javer
___________________________________________________________________
Name: svk:merge
   - 1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk/misc/javer:16422
   + 1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk/misc/javer:16424

Modified: trunk/misc/javer/src/javer/HaverClient.java
===================================================================
--- trunk/misc/javer/src/javer/HaverClient.java 2005-01-14 03:36:41 UTC (rev 
597)
+++ trunk/misc/javer/src/javer/HaverClient.java 2005-01-14 21:07:21 UTC (rev 
598)
@@ -119,7 +119,14 @@
                         return;
                     if (pingDaemon != null)
                         pingDaemon.serverResponse();
-                    dispatchCommand(s);
+                    try {
+                        dispatchCommand(s);
+                    } catch (IOException e) {
+                        throw e;
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        // Dazed and confused, but trying to continue...
+                    }
                 }
             } catch (java.io.IOException e) {
                 if (!eventIOException(e)) {
@@ -530,10 +537,10 @@
                     nextEvt = nextPing;
                 else
                     nextEvt = nextDead;
-                System.out.println("lastPing=" + lastPing + " lastPong=" + 
lastPong);
+                /*System.out.println("lastPing=" + lastPing + " lastPong=" + 
lastPong);
                 System.out.println("nextPing = " + nextPing + " nextDead = " + 
nextDead + " nextEvt=" + nextEvt);
                 System.out.println("Now = " + now);
-                System.out.println("p="+nextPing+"\nn="+now);
+                System.out.println("p="+nextPing+"\nn="+now);*/
                 if (now >= nextPing) {
                     try {
                         pokeServer();
@@ -554,7 +561,7 @@
                 }
                 delta = nextEvt - now;
                 try {
-                    System.out.println("Sleeping for " + delta +"ms");
+                    //System.out.println("Sleeping for " + delta +"ms");
                     this.sleep(delta);
                 } catch(InterruptedException e) {}
             }

Modified: trunk/misc/javer/src/javer/NonblockingOutputStream.java
===================================================================
--- trunk/misc/javer/src/javer/NonblockingOutputStream.java     2005-01-14 
03:36:41 UTC (rev 597)
+++ trunk/misc/javer/src/javer/NonblockingOutputStream.java     2005-01-14 
21:07:21 UTC (rev 598)
@@ -62,7 +62,7 @@
                         preflush_len = 0;
                         preflush = null;
                     } else if (active_len == 0) {
-                        System.out.println("active_len == 0, blocking");
+                        //System.out.println("active_len == 0, blocking");
                         if (autoflush) {
                             out.flush();
                         }
@@ -73,12 +73,12 @@
                         try {
                             th.wait();
                         } catch (InterruptedException e) {}
-                        System.out.println("done blocking");
+                        //System.out.println("done blocking");
                         continue;
                     }
                 }
                 Iterator it;
-                System.out.println("writing, active_len = " + active_len);
+                //System.out.println("writing, active_len = " + active_len);
                 it = work.iterator();
                 while (it.hasNext()) {
                     byte[] b = (byte[]) it.next();
@@ -97,7 +97,7 @@
     public void write(byte[] b) throws IOException {
         if (b.length == 0)
             return;
-        System.out.println("write called");
+        //System.out.println("write called");
         synchronized(th) {
             if (pending_exception != null)
                 throw pending_exception;


Reply via email to