Added exception catching for disconnect()

This commit is contained in:
Treeku
2014-05-31 16:28:55 +01:00
parent 7744f43d66
commit 4d51a64c6c
+6 -1
View File
@@ -83,7 +83,12 @@ public class ConnectionService implements INetworkDispatch {
for(Client c : core.getActiveConnectionsMap().values()) {
if(c.getParent() != null) {
if ((System.currentTimeMillis() - c.getSession().getLastReadTime()) > 300000) {
disconnect(c);
try {
disconnect(c);
} catch (Exception e) {
System.err.println("ConnectionService:disconnect(): Error disconnecting client.");
e.printStackTrace();
}
}
}
}