mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-65970 airnotifier: Set lower timeout for Push curl requests
This commit is contained in:
parent
1c3efe48f8
commit
57e4faa094
@ -117,6 +117,8 @@ class message_output_airnotifier extends message_output {
|
||||
$header = array('Accept: application/json', 'X-AN-APP-NAME: ' . $CFG->airnotifierappname,
|
||||
'X-AN-APP-KEY: ' . $CFG->airnotifieraccesskey);
|
||||
$curl = new curl;
|
||||
// Push notifications are supposed to be instant, do not wait to long blocking the execution.
|
||||
$curl->setopt(array('CURLOPT_TIMEOUT' => 2, 'CURLOPT_CONNECTTIMEOUT' => 2));
|
||||
$curl->setHeader($header);
|
||||
|
||||
$params = array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user