-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The panic happens when interval between 0 and 1 is given. The code that tested whether the interval was > 0 correctly converted to floats first and then back to time. And then checked it in order to prevent this very panic. Unfortunately it then did the same calculation again but this time by converting the interval directly to int before multiplying by milliseconds. Which ends up rounding it to 0. Making the whole result zero and leading to time.NewTicker to panic. This was already done correctly for setTimeout when the same panic was found there and the wrong conversation was added for setInterval. Previous commit df3ad1b
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 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