From dae2375bf3fbfc53090c5502c3203280d8111f5e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 25 Nov 2016 21:59:17 +0000 Subject: [PATCH] Switch back to edge environment on travis and fix bug on datacenter switch --- .travis.yml | 4 ++-- src/danog/MadelineProto/MTProtoTools/CallHandler.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88b71f7c..2d6d3e73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ sudo: required -#dist: trusty -#group: edge +dist: trusty +group: edge language: php php: - '7.0' diff --git a/src/danog/MadelineProto/MTProtoTools/CallHandler.php b/src/danog/MadelineProto/MTProtoTools/CallHandler.php index 6495a890..38d728ac 100644 --- a/src/danog/MadelineProto/MTProtoTools/CallHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/CallHandler.php @@ -42,8 +42,7 @@ class CallHandler extends AuthKeyHandler $dc = preg_replace('/[^0-9]+/', '', $response['error_message']); \danog\MadelineProto\Logger::log('Received request to switch to DC '.$dc); $this->switch_dc($dc); - - return $this->method_call($this->datacenter->outgoing_messages[$last_sent]['content']['method'], $this->datacenter->outgoing_messages[$last_sent]['content']['args']); + throw new \danog\MadelineProto\Exception('I had to switch to datacenter '.$dc); break; default: