From 52780f7c9d75cca0c02628e54c519dc9f2b457f2 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 5 Jun 2018 23:16:43 +0200 Subject: [PATCH 1/2] Revert "added 300ms curl timeout for the push_notifications" --- include/classes/push_notification/notifymyandroid.php | 1 - include/classes/push_notification/pushover.php | 1 - 2 files changed, 2 deletions(-) diff --git a/include/classes/push_notification/notifymyandroid.php b/include/classes/push_notification/notifymyandroid.php index 936a78fc..923caad4 100644 --- a/include/classes/push_notification/notifymyandroid.php +++ b/include/classes/push_notification/notifymyandroid.php @@ -24,7 +24,6 @@ class Notifications_NotifyMyAndroid implements IPushNotification { public function notify($message, $severity = 'info', $event = null){ global $setting; curl_setopt_array($ch = curl_init(), array( - CURLOPT_TIMEOUT_MS => 300, CURLOPT_URL => "https://www.notifymyandroid.com/publicapi/notify", CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, diff --git a/include/classes/push_notification/pushover.php b/include/classes/push_notification/pushover.php index 6cd56fe3..3c232fed 100644 --- a/include/classes/push_notification/pushover.php +++ b/include/classes/push_notification/pushover.php @@ -27,7 +27,6 @@ public function notify($message, $severity = 'info', $event = null){ curl_setopt_array($ch = curl_init(), array( - CURLOPT_TIMEOUT_MS => 300, CURLOPT_URL => "https://api.pushover.net/1/messages.json", CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, From 1fcc88a2c1a9574ca39097533522b2eaee964a6d Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 5 Jun 2018 23:22:28 +0200 Subject: [PATCH 2/2] added 1500ms curl timeout for the push_notifications added 1500ms curl timeout for the push_notifications. otherwise the findblock cron will run default 300s timeout if a service goes down. (notifymyandroid is down.) 300ms are not enough for pushover working fine with fine with 1000ms increased it to 1500ms for high ping connections. --- include/classes/push_notification/notifymyandroid.php | 1 + include/classes/push_notification/pushover.php | 1 + 2 files changed, 2 insertions(+) diff --git a/include/classes/push_notification/notifymyandroid.php b/include/classes/push_notification/notifymyandroid.php index 923caad4..e5307d79 100644 --- a/include/classes/push_notification/notifymyandroid.php +++ b/include/classes/push_notification/notifymyandroid.php @@ -24,6 +24,7 @@ class Notifications_NotifyMyAndroid implements IPushNotification { public function notify($message, $severity = 'info', $event = null){ global $setting; curl_setopt_array($ch = curl_init(), array( + CURLOPT_TIMEOUT_MS => 1500, CURLOPT_URL => "https://www.notifymyandroid.com/publicapi/notify", CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, diff --git a/include/classes/push_notification/pushover.php b/include/classes/push_notification/pushover.php index 3c232fed..236aa6b7 100644 --- a/include/classes/push_notification/pushover.php +++ b/include/classes/push_notification/pushover.php @@ -27,6 +27,7 @@ public function notify($message, $severity = 'info', $event = null){ curl_setopt_array($ch = curl_init(), array( + CURLOPT_TIMEOUT_MS => 1500, CURLOPT_URL => "https://api.pushover.net/1/messages.json", CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,