Fixes to the update loop

This commit is contained in:
Daniil Gentili 2018-08-29 17:55:56 +02:00
parent 0a91935cc1
commit 5de602a1fd
2 changed files with 4 additions and 1 deletions

2
docs

@ -1 +1 @@
Subproject commit fbf634469595ff88e833e13964a797a79f4dc42f Subproject commit 126051eca8b037c1b911a4546d0440dc798ce3ce

View File

@ -30,6 +30,9 @@ trait Loop
if (in_array($this->settings['updates']['callback'], [['danog\\MadelineProto\\API', 'get_updates_update_handler'], 'get_updates_update_handler'])) { if (in_array($this->settings['updates']['callback'], [['danog\\MadelineProto\\API', 'get_updates_update_handler'], 'get_updates_update_handler'])) {
return true; return true;
} }
if (!is_callable($this->loop_callback) || (is_array($this->loop_callback) && $this->loop_callback[1] === 'onLoop' && !method_exists(...$this->loop_callback))) {
$this->loop_callback = null;
}
if (php_sapi_name() !== 'cli') { if (php_sapi_name() !== 'cli') {
try { try {
set_time_limit(-1); set_time_limit(-1);