This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid firehose logger spinning the CPU
Under no load, the Firehose logger spun the CPU because the max of (MAX_INTERVAL-time_since_sent, 0) always resulted in 0. This is because the time_since_sent became quite large, and the MAX_INTERVAL was only 30 resulting in a high negative number. 0 was the max, so the loop would spin. What was actually intended was to track every send attempt, and wait for MAX_INTERVAL - (now - last_sent_time).
- Loading branch information
Showing
2 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters