bpo-35682: Fix _ProactorBasePipeTransport._force_close() (GH-11462) · python/cpython@80fda71 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 80fda71
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.
File tree
2 files changed
lines changed
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -111,7 +111,7 @@ def _fatal_error(self, exc, message='Fatal error on pipe transport'): | ||
111 | 111 | self._force_close(exc) |
112 | 112 | |
113 | 113 | def _force_close(self, exc): |
114 | -if self._empty_waiter is not None: | |
114 | +if self._empty_waiter is not None and not self._empty_waiter.done(): | |
115 | 115 | if exc is None: |
116 | 116 | self._empty_waiter.set_result(None) |
117 | 117 | else: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1 | +Fix ``asyncio.ProactorEventLoop.sendfile()``: don't attempt to set the result | |
2 | +of an internal future if it's already done. |