bpo-32622, bpo-35682: Fix asyncio.ProactorEventLoop.sendfile(): don't
attempt to set the result of an internal future if it's already done.
Fix asyncio _ProactorBasePipeTransport._force_close(): don't set the
result of _empty_waiter if it's already done.
self._force_close(exc)
def _force_close(self, exc):
- if self._empty_waiter is not None:
+ if self._empty_waiter is not None and not self._empty_waiter.done():
if exc is None:
self._empty_waiter.set_result(None)
else:
--- /dev/null
+Fix ``asyncio.ProactorEventLoop.sendfile()``: don't attempt to set the result
+of an internal future if it's already done.