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.
This commit is contained in:
Philipp 2018-06-05 23:22:28 +02:00
parent 52780f7c9d
commit 1fcc88a2c1
2 changed files with 2 additions and 0 deletions

View File

@ -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,

View File

@ -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,