tjcsl / cslbot

An easily extensible, modular irc bot.
GNU General Public License v2.0
15 stars 16 forks source link

Fix worker pool on reload #925

Closed pefoley2 closed 9 years ago

pefoley2 commented 9 years ago

There's a really nasty race-condition between the url hook's usage of the helpers/workers.py pool, and the reload code. As part of reloading, the reload code shuts down the pool. If messages are being sent to irc at the same time, hooks/url.py tries to kick off a worker using the worker pool, and fails because it runs between the time the old pool is shutdown and the new pool is spun up.

pefoley2 commented 9 years ago

I can reproduce it w/ https://gist.github.com/pefoley2/76f1575ed5000abdda8c

pefoley2 commented 9 years ago

Should be fixed as of https://github.com/tjcsl/cslbot/commit/8b8f738ecc568c8dfefc1ea1e40737aa5c003505