From 6236908a387196e84e09b6409e3a9fccc053f5b5 Mon Sep 17 00:00:00 2001 From: "Joerg (DJ7NT)" Date: Thu, 4 Apr 2024 11:58:48 +0200 Subject: [PATCH] Hotfix: Added Timeout for QRZ --- application/libraries/Qrz.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/libraries/Qrz.php b/application/libraries/Qrz.php index 40fb0552b..d62d58fa8 100755 --- a/application/libraries/Qrz.php +++ b/application/libraries/Qrz.php @@ -17,6 +17,8 @@ class Qrz { curl_setopt($ch, CURLOPT_URL, $xml_feed_url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); $xml = curl_exec($ch); curl_close($ch); @@ -40,6 +42,8 @@ class Qrz { curl_setopt($ch, CURLOPT_URL, $xml_feed_url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); $xml = curl_exec($ch); curl_close($ch); @@ -65,6 +69,8 @@ class Qrz { curl_setopt($ch, CURLOPT_URL, $xml_feed_url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); $xml = curl_exec($ch); $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch);