diff --git a/config/pirsch.php b/config/pirsch.php index 37687fa..5fb0189 100644 --- a/config/pirsch.php +++ b/config/pirsch.php @@ -4,4 +4,6 @@ 'token' => env('PIRSCH_TOKEN'), + 'timeout' => env('PIRSCH_TIMEOUT', 250), + ]; diff --git a/src/Pirsch.php b/src/Pirsch.php index a9be9ca..330b62f 100755 --- a/src/Pirsch.php +++ b/src/Pirsch.php @@ -18,12 +18,7 @@ public static function track( try { Http::withToken(config('pirsch.token')) - ->connectTimeout(0.5) - ->retry( - times: 3, - sleepMilliseconds: 100, - throw: false, - ) + ->timeout(config('pirsch.timeout')) ->post( url: 'https://api.pirsch.io/api/v1/'.($name === null ? 'hit' : 'event'), data: [