summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-02 20:49:31 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-02 20:49:31 (GMT)
commit4c0a09a0c96d3027ccb4e395ac9bd9dae5db33f1 (patch)
treed9f58851331ccf578b5a5086560fb107b2ef3d46 /Lib/asyncio
parentf6b5cad3c37f5f8d2db5ded60c85b2beab360181 (diff)
downloadcpython-4c0a09a0c96d3027ccb4e395ac9bd9dae5db33f1.zip
cpython-4c0a09a0c96d3027ccb4e395ac9bd9dae5db33f1.tar.gz
cpython-4c0a09a0c96d3027ccb4e395ac9bd9dae5db33f1.tar.bz2
Revert da29a94367b2
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/tasks.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 45c6d1b..9bfc1cf 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -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,