Хэндшейк, сервисы, аннотационные блокировки в протоколе, репозитории
This commit is contained in:
@@ -46,7 +46,7 @@ public class Client {
|
||||
this.eciTags = new HashMap<Class<? extends ECITag>, ECITag>();
|
||||
this.heartbeatInterval = heartbeatInterval;
|
||||
this.lastHeartbeatTime = System.currentTimeMillis();
|
||||
this.packetManager = new PacketManager();
|
||||
this.packetManager = packetManager;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,7 +57,7 @@ public class Client {
|
||||
* @return
|
||||
*/
|
||||
public boolean isAlive() {
|
||||
return (System.currentTimeMillis() - this.lastHeartbeatTime) * 2 <= this.heartbeatInterval * 1000;
|
||||
return (System.currentTimeMillis() - this.lastHeartbeatTime) <= ((this.heartbeatInterval * 1000) * 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user