mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-08 23:13:25 -04:00
Added additional logging for logout / disappear mechanism
This commit is contained in:
@@ -33,8 +33,11 @@ public class ConnectionService extends Service {
|
||||
for (Player p : zonedInPlayers) {
|
||||
if (p.getTimeSinceLastPacket() > DISAPPEAR_THRESHOLD) {
|
||||
p.setPlayerState(PlayerState.DISCONNECTED);
|
||||
System.out.println(p.getCharacterName() + " disappeared");
|
||||
new PlayerEventIntent(p, PlayerEvent.PE_DISAPPEAR).broadcast();
|
||||
} else if (p.getTimeSinceLastPacket() > LD_THRESHOLD) {
|
||||
if (p.getPlayerState() != PlayerState.LOGGED_OUT)
|
||||
System.out.println("Logged out " + p.getCharacterName());
|
||||
p.setPlayerState(PlayerState.LOGGED_OUT);
|
||||
}
|
||||
}
|
||||
@@ -52,7 +55,7 @@ public class ConnectionService extends Service {
|
||||
|
||||
@Override
|
||||
public boolean start() {
|
||||
updateService.scheduleAtFixedRate(updateRunnable, 1, 1, TimeUnit.SECONDS);
|
||||
updateService.scheduleAtFixedRate(updateRunnable, 10, 10, TimeUnit.SECONDS);
|
||||
return super.start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user