Smaller timeout for database

This commit is contained in:
Daniil Gentili 2019-07-21 14:52:34 +00:00
parent 1067d24e7c
commit c31f4493a1

View File

@ -87,7 +87,7 @@ class RPCErrorException extends \Exception
|| !isset(self::$descriptions[$error]) || !isset(self::$descriptions[$error])
|| $code === 500 || $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'])) { if (isset($res['ok']) && $res['ok'] && isset($res['result'])) {
$description = $res['result']; $description = $res['result'];