Merge pull request #21 from Deutscher-Tischfussballbund/fix/20

Fix #20 Add timeout to push server call
This commit is contained in:
Daniel Görlich
2022-03-17 18:25:43 +01:00
committed by GitHub
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -12,3 +12,4 @@
/package /package
/data /data
/data_backup
@@ -42,6 +42,7 @@ function notifyChange($data) {
'Authorization: ' . $key, 'Authorization: ' . $key,
'Content-Type: application/json', 'Content-Type: application/json',
), ),
CURLOPT_TIMEOUT => 2,
CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_POSTFIELDS => json_encode($data),
)); ));
$resp = curl_exec($ch); $resp = curl_exec($ch);