From 05587ab387ceeac2df89cb3ec2b6704d35b0f9a6 Mon Sep 17 00:00:00 2001 From: Paul Speed Date: Thu, 31 Dec 2015 04:23:11 -0500 Subject: [PATCH] Modified to avoid closing the connection if it is already closed. Certain race conditions can cause this to happen during whole-server shutdown. --- .../src/main/java/com/jme3/network/base/DefaultServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.java b/jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.java index e95c0f97f..eceaf6d73 100644 --- a/jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.java +++ b/jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.java @@ -608,7 +608,7 @@ public class DefaultServer implements Server // should always already be closed through all paths that I // can conceive... but it doesn't hurt to be sure. for( Endpoint p : channels ) { - if( p == null ) + if( p == null || !p.isConnected() ) continue; p.close(); }