-
-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: panic: runtime error: integer divide by zero
"Do" function triggers "doCommon" function that sets "inScheduleChain" to false. In "getCurrentJob", if "inScheduleChain" is false, then a new job will be added to a slice and the current job will be the last element of the slice. Therefore, after "Do" function runs, "StartAt" will try to obtain the current job. Since "inScheduleChain" is false, a new job with interval 0 will be added and returned as the current job in "StartAt" function. After this interval 0 will produce "duration" to be 0 and "panic: runtime error: integer divide by zero".
- Loading branch information
1 parent
604aa9b
commit f07c724
Showing
3 changed files
with
24 additions
and
0 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
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