diff --git a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php index 79173e79f..c8b43cdab 100644 --- a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php +++ b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php @@ -107,9 +107,9 @@ trait AuthKeyHandler $time = microtime(true); while (!feof($f)) { usleep( - ($writePeriod - - ($time - microtime(true)) // Time it took me to write frames - ) * 1000000 + (int)(($writePeriod - + (microtime(true) - $time) // Time it took me to write frames + ) * 1000000) ); $time = microtime(true); $this->calls[$params['id']]['controller']->writeFrames(stream_get_contents($f, 960 * 2));