remove unnecessary nested if

This commit is contained in:
Matt Parnell
2014-08-18 23:04:19 -05:00
parent 1f899f9851
commit fcefe79ba0
+6 -8
View File
@@ -84,14 +84,12 @@ public class ConnectionService implements INetworkDispatch {
try {
synchronized(core.getActiveConnectionsMap()) {
for(Client c : core.getActiveConnectionsMap().values()) {
if(c.getParent() != null) {
if ((System.currentTimeMillis() - c.getSession().getLastReadTime()) > 300000) {
try {
disconnect(c);
} catch (Exception e) {
System.err.println("ConnectionService:disconnect(): Error disconnecting client.");
e.printStackTrace();
}
if ((c.getParent() != null) && (System.currentTimeMillis() - c.getSession().getLastReadTime()) > 300000) {
try {
disconnect(c);
} catch (Exception e) {
System.err.println("ConnectionService:disconnect(): Error disconnecting client.");
e.printStackTrace();
}
}
}