Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Set timeout for TG alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
arrilot authored Dec 13, 2018
1 parent db6a95c commit 4344818
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Telegram/TelegramHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ protected function write(array $record)
$headers = ['Content-Type: application/json'];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, sprintf('https://api.telegram.org/bot%s/sendMessage', $this->token));
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 10000);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $content);
Expand Down

0 comments on commit 4344818

Please sign in to comment.