Fixed Tornado worker exiting.

Thanks to Masahiro Nakagawa for the report and patch.

Fixes #216
This commit is contained in:
Paul J. Davis 2011-06-06 06:34:14 -04:00
parent 7ffa097cf7
commit e1e634a8aa
2 changed files with 5 additions and 0 deletions

1
THANKS
View File

@ -29,3 +29,4 @@ Dan Sully <daniel-github@electricrain.com>
Fabian Topfstedt <topfstedt@schneevonmorgen.com>
Denis Bilenko <denis.bilenko@gmail.com>
Michael Schurter <m@schmichael.com>
Masahiro Nakagawa <repeatedly@gmail.com>

View File

@ -30,6 +30,10 @@ class TornadoWorker(Worker):
web.RequestHandler.clear = clear
sys.modules["tornado.web"] = web
def handle_quit(self, sig, frame):
super(TornadoWorker, self).handle_quit(sig, frame)
self.ioloop.stop()
def watchdog(self):
self.notify()