mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-92841: Fix asyncio's RuntimeError: Event loop is closed (GH-92842)
(cherry picked from commit 33880b4b1c
)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
This commit is contained in:
parent
58088a544c
commit
36da1a77c6
2 changed files with 3 additions and 1 deletions
|
@ -113,7 +113,7 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin,
|
|||
def __del__(self, _warn=warnings.warn):
|
||||
if self._sock is not None:
|
||||
_warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
|
||||
self.close()
|
||||
self._sock.close()
|
||||
|
||||
def _fatal_error(self, exc, message='Fatal error on pipe transport'):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue