Skip to content

Commit 5bfe0d5

Browse files
committed
fix telemetry: connection timeout in case of boom
1 parent 600e342 commit 5bfe0d5

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

app/BlueprintFramework/Services/TelemetryService/BlueprintTelemetryService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ public function send($event) {
2323
CURLOPT_RETURNTRANSFER => true,
2424
CURLOPT_ENCODING => '',
2525
CURLOPT_MAXREDIRS => 10,
26-
CURLOPT_TIMEOUT => 0,
26+
CURLOPT_TIMEOUT => 3,
2727
CURLOPT_FOLLOWLOCATION => true,
2828
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
2929
CURLOPT_CUSTOMREQUEST => 'GET',
30+
CURLOPT_CONNECTTIMEOUT => 2,
3031
));
3132

3233
$response = curl_exec($curl);

blueprint/lib/misc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sendTelemetry() {
2121
if [[ $key == "KEY_NOT_UPDATED" ]]; then
2222
exit 1
2323
fi
24-
curl --location --silent "http://api.blueprint.zip:50000/send/$key/$1" > /dev/null
24+
curl --location --silent --connect-timeout 3 "http://api.blueprint.zip:50000/send/$key/$1" &
2525
}
2626

2727
# === CACHEREMINDER ===

0 commit comments

Comments
 (0)