浏览代码

Removing a println I had for testing something else.
Added some gating to the endpoint closure to try to delay
some NPE I'm seeing caused be a race condition somewhere when
client and server in the same VM and shutting down at the same
time.

Paul Speed 9 年之前
父节点
当前提交
b28f7e9293
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      jme3-networking/src/main/java/com/jme3/network/base/KernelAdapter.java

+ 4 - 4
jme3-networking/src/main/java/com/jme3/network/base/KernelAdapter.java

@@ -122,10 +122,10 @@ public class KernelAdapter extends Thread
         // retrieve them.  For now we'll just log it.  FIXME
         log.log( Level.SEVERE, "Unhandled error, endpoint:" + p + ", context:" + context, e );
 
-        //if( p.isConnected() )
-        System.out.println("Is p connected:" + p.isConnected());
-        // In lieu of other options, at least close the endpoint
-        p.close();
+        if( p.isConnected() ) {
+            // In lieu of other options, at least close the endpoint
+            p.close();
+        }
     }                                                      
 
     protected HostedConnection getConnection( Endpoint p )