PaulSonOfLars / gotgbot

Autogenerated Go wrapper for the telegram API. Inspired by the python-telegram-bot library.
MIT License
478 stars 106 forks source link

Fix updater.stop() panic #48

Closed PaulSonOfLars closed 2 years ago

PaulSonOfLars commented 2 years ago

What

Fix a reported issue where a concurrency issue causes writes to the closed UpdateChan in the Updater. The fix to this is to use channels to communicate that this should not be done.

Impact

soekarnohatta commented 2 years ago

finally... gonna try this out

PaulSonOfLars commented 2 years ago

finally... gonna try this out

Please note I haven't had the time to fully test this (hence the PR not being merged) so there may still be issues.

Your testing and feedback would be very valuable :)

soekarnohatta commented 2 years ago

finally... gonna try this out

Please note I haven't had the time to fully test this (hence the PR not being merged) so there may still be issues.

Your testing and feedback would be very valuable :)

image

Great! The bot can now shutdown gracefully without any errors ... as of my testing, no new problems occured. I've been testing for atleast 3 times with the bot still receiving updates, and 2 times with the bot receiving 0 update and both passed the test