mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.11] GH-89237: fix hang in proactor subprocess.wait_closed()
(GH-98572) (#98620)
GH-89237: fix hang in proactor `subprocess.wait_closed()` (GH-98572)
(cherry picked from commit ad1dc3ebb6
)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
This commit is contained in:
parent
5fb3b61114
commit
8950689dce
3 changed files with 10 additions and 2 deletions
|
@ -290,7 +290,12 @@ class ProactorSocketTransportTests(test_utils.TestCase):
|
|||
tr._closing = True
|
||||
tr._force_close(None)
|
||||
test_utils.run_briefly(self.loop)
|
||||
self.assertFalse(self.protocol.connection_lost.called)
|
||||
# See https://github.com/python/cpython/issues/89237
|
||||
# `protocol.connection_lost` should be called even if
|
||||
# the transport was closed forcefully otherwise
|
||||
# the resources held by protocol will never be freed
|
||||
# and waiters will never be notified leading to hang.
|
||||
self.assertTrue(self.protocol.connection_lost.called)
|
||||
|
||||
def test_fatal_error_2(self):
|
||||
tr = self.socket_transport()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue