From a7d7eae509b7ec49f8d1cb87f39dababbefad24c Mon Sep 17 00:00:00 2001 From: danogentili Date: Sun, 9 Oct 2016 19:47:19 +0200 Subject: [PATCH] Fixed connection recreation --- src/danog/MadelineProto/MTProtoTools/CallHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/MTProtoTools/CallHandler.php b/src/danog/MadelineProto/MTProtoTools/CallHandler.php index 53e78c7d..289e8842 100644 --- a/src/danog/MadelineProto/MTProtoTools/CallHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/CallHandler.php @@ -53,7 +53,7 @@ class CallHandler extends AuthKeyHandler } catch (Exception $e) { $this->log->log('An error occurred while calling method '.$method.': '.$e->getMessage().' in '.$e->getFile().':'.$e->getLine().$e->getTraceAsString().'. Recreating connection and retrying to call method...'); unset($this->connection); - $this->connection = new DataCenter($this->settings['connection'], $this->settings['connection_settings']); + $this->connection = new \danog\MadelineProto\DataCenter($this->settings['connection'], $this->settings['connection_settings']); continue; } if ($server_answer == null) { @@ -75,7 +75,7 @@ class CallHandler extends AuthKeyHandler } catch (Exception $e) { $this->log->log('An error occurred while calling object '.$object.': '.$e->getMessage().' in '.$e->getFile().':'.$e->getLine().'. Recreating connection and retrying to call object...'); unset($this->connection); - $this->connection = new DataCenter($this->settings['connection'], $this->settings['connection_settings']); + $this->connection = new \danog\MadelineProto\DataCenter($this->settings['connection'], $this->settings['connection_settings']); continue; }