]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Revert da29a94367b2
authorYury Selivanov <yselivanov@sprymix.com>
Sun, 2 Aug 2015 20:49:31 +0000 (16:49 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Sun, 2 Aug 2015 20:49:31 +0000 (16:49 -0400)
Lib/asyncio/tasks.py

index 45c6d1b0e03990a34c2d03620aed3d268c2b935e..9bfc1cf81479c68b271ab81a1812436e9201401f 100644 (file)
@@ -249,8 +249,9 @@ class Task(futures.Future):
                     result._blocking = False
                     result.add_done_callback(self._wakeup)
                     self._fut_waiter = result
-                    if self._must_cancel and self._fut_waiter.cancel():
-                        self._must_cancel = False
+                    if self._must_cancel:
+                        if self._fut_waiter.cancel():
+                            self._must_cancel = False
                 else:
                     self._loop.call_soon(
                         self._step, None,