From 6e3f76329a1ab769d0dbd9a50e1afe1a05198aac Mon Sep 17 00:00:00 2001 From: RedSparr0w Date: Fri, 22 Nov 2019 16:40:18 +1300 Subject: [PATCH] force logout on timeout --- 2006Redone Server/src/redone/Constants.java | 2 +- 2006Redone Server/src/redone/game/players/Client.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/2006Redone Server/src/redone/Constants.java b/2006Redone Server/src/redone/Constants.java index 1b192790..0ba86f3a 100644 --- a/2006Redone Server/src/redone/Constants.java +++ b/2006Redone Server/src/redone/Constants.java @@ -177,7 +177,7 @@ public class Constants { "shade", "skeleton", "skeleton brute", "skeleton thug", "skeleton warload", "summoned zombie", "skorge", "tortured soul", "undead chicken", "undead cow", "undead one", "undead troll", "zombie", "zombie rat", "zogre" }; - public final static int TIMEOUT = 20; + public final static int TIMEOUT = 60; public final static int CYCLE_TIME = 600; public final static int BUFFER_SIZE = 10000; diff --git a/2006Redone Server/src/redone/game/players/Client.java b/2006Redone Server/src/redone/game/players/Client.java index 5f506753..4c14fcc2 100644 --- a/2006Redone Server/src/redone/game/players/Client.java +++ b/2006Redone Server/src/redone/game/players/Client.java @@ -1111,7 +1111,8 @@ public class Client extends Player { } if (timeOutCounter > Constants.TIMEOUT) { - disconnected = true; + if (!isBot) + logout(true); } timeOutCounter++;