added 300ms curl timeout for the push_notifications

added 300ms curl timeout for the push_notifications. otherwise the findblock cron will run default 300s timeout if a service goes down. (notifymyandroid is down.)
This commit is contained in:
Philipp 2018-06-03 12:58:09 +02:00
parent 3a14e9fd3a
commit dad8c07ec3
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 => 300,
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 => 300,
CURLOPT_URL => "https://api.pushover.net/1/messages.json",
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,