mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-29711: Fix stop_serving in proactor loop kill all listening servers (#431)
This commit is contained in:
parent
36c2c04478
commit
319c0345cd
3 changed files with 19 additions and 5 deletions
|
@ -536,6 +536,8 @@ class BaseProactorEventLoop(base_events.BaseEventLoop):
|
|||
self._accept_futures.clear()
|
||||
|
||||
def _stop_serving(self, sock):
|
||||
self._stop_accept_futures()
|
||||
future = self._accept_futures.pop(sock.fileno(), None)
|
||||
if future:
|
||||
future.cancel()
|
||||
self._proactor._stop_serving(sock)
|
||||
sock.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue