Skip to content
This repository was archived by the owner on Sep 24, 2022. It is now read-only.

[Bug] Negitive new timer with dynamic vote times #251

@weeryan17

Description

@weeryan17

Describe the bug
this error is thrown sometimes with dynamically timed vote groups https://paste.traincarts.net/oboheyavow
I believe this has to do with voting near when the vote is supposed to run out (probably within milliseconds),. The new timer to finish the vote is passed in a negative time because of this on this line
https://github.com/CascadeBot/CascadeBot/blob/dev/src/main/java/org/cascadebot/cascadebot/utils/votes/VoteButtonGroup.java#L130

I'm fairly sure we can't easily reproduce this in prod, and might even be caused by a race condition with the vote finishing, but not saying it's finished before the time is attempted to be increased. Either way we need some way to handle if subsequent vote timers have a negative time.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions