mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-100573: Fix server hang caused by os.stat() on named pipe (Windows) (#100959)
This commit is contained in:
parent
c00eb1eae6
commit
1bc7a73683
3 changed files with 46 additions and 0 deletions
|
@ -366,6 +366,10 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
|
|||
return
|
||||
|
||||
f = self._proactor.accept_pipe(pipe)
|
||||
except BrokenPipeError:
|
||||
if pipe and pipe.fileno() != -1:
|
||||
pipe.close()
|
||||
self.call_soon(loop_accept_pipe)
|
||||
except OSError as exc:
|
||||
if pipe and pipe.fileno() != -1:
|
||||
self.call_exception_handler({
|
||||
|
@ -377,6 +381,7 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
|
|||
elif self._debug:
|
||||
logger.warning("Accept pipe failed on pipe %r",
|
||||
pipe, exc_info=True)
|
||||
self.call_soon(loop_accept_pipe)
|
||||
except exceptions.CancelledError:
|
||||
if pipe:
|
||||
pipe.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue