mark2devel / mark2

Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
Other
205 stars 44 forks source link

Fix a bug when trying to cancel an already called or cancelled event #177

Closed Column01 closed 3 months ago

Column01 commented 3 months ago

Previously, when a server is restarted the event queue of shutdown events is never cleared. This leads to an exception when trying to cancel a pending restart after a restart has already occurred as the list was never cleared. Now, it correctly checks if events have been called or cancelled before trying to cancel them and the shutdown cancel queue is cleared every time the server is started to ensure it doesn't persist across restarts.

Fixes #152