Skip to content

Commit

Permalink
fix bug when reset time is in the past
Browse files Browse the repository at this point in the history
  • Loading branch information
justijndepover committed Apr 11, 2024
1 parent 1dc4158 commit b66d0c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Teamleader.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ public function ensureRateLimitingIsNotExceeded(): void
$seconds = Carbon::createFromFormat('Y-m-d\TH:i:sT', $this->rateLimitReset, 'UTC')->diffInSeconds();
$seconds++;

sleep($seconds);
if ($seconds > 0) {
sleep($seconds);
}
}
}

Expand Down

0 comments on commit b66d0c5

Please sign in to comment.