PomoBot icon indicating copy to clipboard operation
PomoBot copied to clipboard

Harden Timer stage changes to discord outages

Open Intery opened this issue 5 years ago • 1 comments

If Timer.change_stage(...) throws an exception while sending the stage change message (potentially due to a Discord hiccup, but also for any other reason), the time remaining will not be updated and the Timer runloop will attempt to change stage again. This may result in the group members being ejected from the group and large amounts of spam as the change stage messages are re-sent.

Proposed Solution

Move the active stage changing logic to the top of change_stage so that it is always guaranteed to occur, making it independent of Discord and network state. Additionally, log exceptions that occur through change_stage rather than silence them.

Intery avatar May 05 '20 05:05 Intery

Implemented in 9634af12457280895f69b24bbfc03945ce61e9b5

Intery avatar Jun 10 '21 19:06 Intery