Kaydet (Commit) 70705e3c authored tarafından Łukasz Langa's avatar Łukasz Langa Kaydeden (comit) GitHub

[3.6] call remove_done_callback in finally section (GH-1688) (#1755)

(cherry picked from commit 21b3e04c)
üst 762add78
...@@ -459,7 +459,8 @@ class BaseEventLoop(events.AbstractEventLoop): ...@@ -459,7 +459,8 @@ class BaseEventLoop(events.AbstractEventLoop):
# local task. # local task.
future.exception() future.exception()
raise raise
future.remove_done_callback(_run_until_complete_cb) finally:
future.remove_done_callback(_run_until_complete_cb)
if not future.done(): if not future.done():
raise RuntimeError('Event loop stopped before Future completed.') raise RuntimeError('Event loop stopped before Future completed.')
......
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