From d98c5a9e39c312424fa2586d1fe846f2999d49f5 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 28 Jul 2021 21:51:50 +0000
Subject: [PATCH] Set explicit 5s connect timeout in proxy script

---
 proxy_common.php |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/proxy_common.php b/proxy_common.php
index a2b7c59..0b06acb 100644
--- a/proxy_common.php
+++ b/proxy_common.php
@@ -107,6 +107,7 @@
 	$parameters[$name] = $_GET[$name];
 }
 
+ini_set('default_socket_timeout', 5);
 $result = @file_get_contents($base_proxy . $path . '?' . http_build_query($parameters));
 if(!$result OR substr($http_response_header[0], 0, 13) != 'HTTP/1.1 200 ') {
 	header('HTTP/1.1 503 Service Unavailable');

--
Gitblit v1.9.1