From 7929e8053eeefae0f077c1d23f4e435390766199 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 8 Jun 2019 00:21:38 +0000 Subject: [PATCH] Fix --- docs | 2 +- src/danog/MadelineProto/Loop/Update/UpdateLoop.php | 4 ++-- src/danog/MadelineProto/MTProtoTools/ResponseHandler.php | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs b/docs index d06f79a1..dc05dc5c 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit d06f79a1848bd380d6ad9a71a3ead0c2c2ded4a1 +Subproject commit dc05dc5cebfcec90ac7851928c522a4d635dbab6 diff --git a/src/danog/MadelineProto/Loop/Update/UpdateLoop.php b/src/danog/MadelineProto/Loop/Update/UpdateLoop.php index 89b90236..dadedfe4 100644 --- a/src/danog/MadelineProto/Loop/Update/UpdateLoop.php +++ b/src/danog/MadelineProto/Loop/Update/UpdateLoop.php @@ -93,17 +93,17 @@ class UpdateLoop extends ResumableSignalLoop return true; } + throw $e; } catch (Exception $e) { if (in_array($e->getMessage(), ['This peer is not present in the internal peer database'])) { $feeder->signal(true); - //$API->getChannelStates()->remove($this->channelId); + $API->getChannelStates()->remove($this->channelId); unset($API->updaters[$this->channelId]); unset($API->feeders[$this->channelId]); $API->logger->logger("Channel private, exiting $this"); return true; } - throw $e; } if (isset($difference['timeout'])) { diff --git a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php index 0b78c6c7..4cf39d0d 100644 --- a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php @@ -296,6 +296,7 @@ trait ResponseHandler break; } } + if ($this->datacenter->sockets[$datacenter]->pending_outgoing) $this->datacenter->sockets[$datacenter]->writer->resume(); //$this->n--; @@ -359,6 +360,7 @@ trait ResponseHandler } switch ($response['error_code']) { case 500: + case -500: if ($response['error_message'] === 'MSG_WAIT_FAILED') { $this->datacenter->sockets[$datacenter]->call_queue[$request['queue']] = []; $this->method_recall('', ['message_id' => $request_id, 'datacenter' => $datacenter, 'postpone' => true]);