From c31f4493a1bc5593723ad147e64c93c513cda0af Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 21 Jul 2019 14:52:34 +0000 Subject: [PATCH] Smaller timeout for database --- src/danog/MadelineProto/RPCErrorException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/RPCErrorException.php b/src/danog/MadelineProto/RPCErrorException.php index c75e2517..03f63a2f 100644 --- a/src/danog/MadelineProto/RPCErrorException.php +++ b/src/danog/MadelineProto/RPCErrorException.php @@ -87,7 +87,7 @@ class RPCErrorException extends \Exception || !isset(self::$descriptions[$error]) || $code === 500 ) { - $res = json_decode(@file_get_contents('https://rpc.pwrtelegram.xyz/?method='.$method.'&code='.$code.'&error='.$error), true); + $res = json_decode(@file_get_contents('https://rpc.pwrtelegram.xyz/?method='.$method.'&code='.$code.'&error='.$error, false, stream_context_create(['http'=>['timeout' => 3]])), true); if (isset($res['ok']) && $res['ok'] && isset($res['result'])) { $description = $res['result'];