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