Fixed NPE error on connection startup freeze;

This commit is contained in:
Oleg Agafonov 2019-04-11 08:25:16 +04:00
parent 076a965e02
commit 718bfb0a52

View file

@ -1592,7 +1592,7 @@ public class SessionImpl implements Session {
@Override
public boolean ping() {
try {
if (isConnected()) {
if (isConnected() && sessionId != null) {
long startTime = System.nanoTime();
if (!server.ping(sessionId, pingInfo)) {
logger.error("Ping failed: " + this.getUserName() + " Session: " + sessionId + " to MAGE server at " + connection.getHost() + ':' + connection.getPort());