mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 09:58:59 +01:00
Reconnect on socket issues if using http
This commit is contained in:
parent
02ca94c04f
commit
e82f6fd0ba
@ -247,7 +247,7 @@ class Connection
|
||||
|
||||
public function read($length)
|
||||
{
|
||||
\danog\MadelineProto\Logger::log(["Asked to read $length"], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
|
||||
//\danog\MadelineProto\Logger::log(["Asked to read $length"], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
|
||||
switch ($this->protocol) {
|
||||
case 'obfuscated2':
|
||||
$packet = '';
|
||||
|
@ -185,6 +185,7 @@ trait CallHandler
|
||||
} catch (\danog\MadelineProto\NothingInTheSocketException $e) {
|
||||
$last_error = 'Nothing in the socket';
|
||||
\danog\MadelineProto\Logger::log(['An error getting response of method '.$method.': '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...'], \danog\MadelineProto\Logger::WARNING);
|
||||
if ($this->is_http($aargs['datacenter'])) $this->close_and_reopen($aargs['datacenter']);
|
||||
continue; //2;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user