NetworkSession: Don't apply handlers to a disconnected session

closes #2756
This commit is contained in:
Dylan K. Taylor 2019-02-15 10:11:31 +00:00
parent dce08b4e88
commit 19f0d7f336

View File

@ -166,8 +166,10 @@ class NetworkSession{
}
public function setHandler(SessionHandler $handler) : void{
$this->handler = $handler;
$this->handler->setUp();
if($this->connected){ //TODO: this is fine since we can't handle anything from a disconnected session, but it might produce surprises in some cases
$this->handler = $handler;
$this->handler->setUp();
}
}
/**