Fixed connection recreation

This commit is contained in:
danogentili 2016-10-09 19:47:19 +02:00
parent adff633caf
commit a7d7eae509

View File

@ -53,7 +53,7 @@ class CallHandler extends AuthKeyHandler
} catch (Exception $e) { } 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...'); $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); 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; continue;
} }
if ($server_answer == null) { if ($server_answer == null) {
@ -75,7 +75,7 @@ class CallHandler extends AuthKeyHandler
} catch (Exception $e) { } 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...'); $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); 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; continue;
} }