This commit is contained in:
Daniil Gentili 2017-05-31 10:28:44 +01:00
commit 8dfd1b21ee
2 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,11 @@ class DataCenter extends \Volatile
$this->dclist = $dclist;
$this->settings = $settings;
foreach ($this->sockets as $key => $socket) {
if ($socket instanceof Connection) $socket->close_and_reopen(); else unset($this->sockets[$key]);
if ($socket instanceof Connection) {
$socket->close_and_reopen();
} else {
unset($this->sockets[$key]);
}
}
}

View File

@ -247,7 +247,9 @@ class MTProto extends \Volatile
$this->should_serialize = true;
}
} catch (RPCErrorException $e) {
if ($e->rpc !== "BOT_METHOD_INVALID") throw $e;
if ($e->rpc !== 'BOT_METHOD_INVALID') {
throw $e;
}
}
}
$this->get_config([], ['datacenter' => $this->datacenter->curdc]);