-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Hi ;)
I'm recently experimenting with your nice bot. However, I stumbled upon this during my "learning-process":
I've created a bot, it worked normally. I just did updater.start_polling like in the examples, but without using updater.idle() (I thought first start_polling is blocking). Exiting with CTRL+C worked immediately, but has thrown a KeyboardInterrupt.
After a while I found the idle() function, but I was actually a bit confused of CTRL+C's behaviour, because I've configured logging with a minimum level of INFO. So I've seen nothing when I pressed the keys. The bot actually needs a while to shutdown, and because nothing was logged I assumed the SIGINT signal wasn't received (/ assuming due to internal threading stuff not properly processed), so I pressed always CTRL+C two times causing a SIGTERM which worked immediately.
SIGINT notifications are only visible when enabling DEBUG-level logging. I would suggest to add an INFO message, that tells something like Received SIGINT, shutting down..., so nobody is worried ;)