Commit 2a9986bd authored by Denis Bilenko's avatar Denis Bilenko

Hub.handle_error: immediatelly raise error instead of scheduling it to be...

Hub.handle_error: immediatelly raise error instead of scheduling it to be raised later if called in MAIN greenlet
parent 5c2af29f
......@@ -227,7 +227,8 @@ class Hub(greenlet):
traceback.print_exception(type, value, tb)
del tb
if where is None or issubclass(type, self.SYSTEM_ERROR):
if getcurrent() is self:
current = getcurrent()
if current is self or current is self.parent:
self.parent.throw(type, value)
else:
self.loop.run_callback(self.parent.throw, type, value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment