LoginSessionHandler: fix crash when disconnected during login handling

This commit is contained in:
Dylan K. Taylor 2018-07-31 19:40:24 +01:00
parent 47cf6e4833
commit 1ef538b69e

View File

@ -74,7 +74,7 @@ class LoginSessionHandler extends SessionHandler{
}
if($this->player->handleLogin($packet)){
if($this->session->getHandler() === $this){ //when login verification is disabled, the handler will already have been replaced
if($this->session->isConnected() and $this->session->getHandler() === $this){ //when login verification is disabled, the handler will already have been replaced
$this->session->setHandler(new NullSessionHandler()); //drop packets received during login verification
}
return true;