This commit is contained in:
Daniil Gentili 2019-12-13 13:34:14 +01:00
parent 9ba299a9dc
commit d559b1d8b6
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 2 additions and 3 deletions

View File

@ -46,7 +46,7 @@ class ContextConnector implements Connector
{ {
return Tools::call(function () use ($uri, $socketContext, $token) { return Tools::call(function () use ($uri, $socketContext, $token) {
$socketContext = $socketContext ?? new ConnectContext; $socketContext = $socketContext ?? new ConnectContext;
$token = $token ?? new NullCancellationToken $token = $token ?? new NullCancellationToken;
$attempt = 0; $attempt = 0;
$uris = []; $uris = [];
@ -167,4 +167,4 @@ class ContextConnector implements Connector
}); });
} }
} }

View File

@ -455,7 +455,6 @@ class DataCenter
// This is only for non-MTProto connections // This is only for non-MTProto connections
if (!$dc_number) { if (!$dc_number) {
/** @var $ctx \danog\MadelineProto\Stream\ConnectionContext */ /** @var $ctx \danog\MadelineProto\Stream\ConnectionContext */
$context->with
$ctx = (new ConnectionContext()) $ctx = (new ConnectionContext())
->setSocketContext($context) ->setSocketContext($context)
->setUri($uri) ->setUri($uri)