Fixed empty logout bug

This commit is contained in:
Z61
2015-05-06 01:39:12 -04:00
parent 440c326571
commit 18f3d1f842
+6 -2
View File
@@ -134,8 +134,12 @@ public class ConnectionService extends Service {
GalacticPacketIntent gpi = (GalacticPacketIntent) i;
Player p = gpi.getPlayerManager().getPlayerFromNetworkId(gpi.getNetworkId());
if (p != null) {
logOut(p);
disconnect(p, DisconnectReason.OTHER_SIDE_TERMINATED);
if (p.getPlayerState() != PlayerState.DISCONNECTED) {
logOut(p);
disconnect(p, DisconnectReason.TIMEOUT);
} else {
disconnect(p, DisconnectReason.OTHER_SIDE_TERMINATED);
}
}
}
}