diff --git a/src/API.php b/src/API.php index 609b7b43e..02645342c 100644 --- a/src/API.php +++ b/src/API.php @@ -51,7 +51,7 @@ final class API extends AbstractAPI * * @var string */ - public const RELEASE = '8.0.0-beta147'; + public const RELEASE = '8.0.0-beta148'; /** * Secret chat was not found. * diff --git a/src/Connection.php b/src/Connection.php index 4a6489d6d..082d9e793 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -518,6 +518,7 @@ final class Connection if ($flush && isset($this->writer)) { $this->writer->resume(); } + $this->connect(); $promise->await(); } /** diff --git a/src/Loop/Connection/ReadLoop.php b/src/Loop/Connection/ReadLoop.php index 1e9856eb0..9e3190966 100644 --- a/src/Loop/Connection/ReadLoop.php +++ b/src/Loop/Connection/ReadLoop.php @@ -65,6 +65,7 @@ final class ReadLoop extends Loop && !$this->connection->hasPendingCalls() && $this->connection->isMedia() && !$this->connection->isWriting() + && $this->shared->hasTempAuthKey() ) { $this->logger->logger("Got NothingInTheSocketException in DC {$this->datacenter}, disconnecting because we have nothing to do...", Logger::ERROR); $this->connection->disconnect(true);