Small bugfix
This commit is contained in:
parent
1b88769aef
commit
7dae233bf7
|
@ -114,6 +114,9 @@ class ReadLoop extends SignalLoop
|
||||||
$API = $this->API;
|
$API = $this->API;
|
||||||
$datacenter = $this->datacenter;
|
$datacenter = $this->datacenter;
|
||||||
$connection = $this->connection;
|
$connection = $this->connection;
|
||||||
|
if (isset($this->connection->old)) {
|
||||||
|
throw new NothingInTheSocketException();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$buffer = yield $connection->stream->getReadBuffer($payload_length);
|
$buffer = yield $connection->stream->getReadBuffer($payload_length);
|
||||||
|
|
|
@ -25,6 +25,7 @@ use danog\MadelineProto\Stream\Async\RawStream;
|
||||||
use danog\MadelineProto\Stream\ConnectionContext;
|
use danog\MadelineProto\Stream\ConnectionContext;
|
||||||
use function Amp\call;
|
use function Amp\call;
|
||||||
use function Amp\Socket\connect;
|
use function Amp\Socket\connect;
|
||||||
|
use danog\MadelineProto\NothingInTheSocketException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Buffered raw stream.
|
* Buffered raw stream.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user