1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 07:34:41 +01:00

Avoid race condition

This commit is contained in:
Daniil Gentili 2021-07-06 18:53:34 +02:00
parent eaa5e30bf1
commit a2dc87cb7e
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -118,7 +118,11 @@ abstract class ClientAbstract
}
if ($this instanceof Client) {
Server::startMe($this->session);
$this->server = yield connect($this->session->getIpcPath());
try {
$this->server = yield connect($this->session->getIpcPath());
} catch (\Throwable $e) {
Logger::log("Got exception while reconnecting in IPC client: $e");
}
} else {
return;
}