diff options
author | Pierre Ossman (ThinLinc team) <ossman@cendio.se> | 2024-03-18 21:15:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 13:15:53 -0700 |
commit | 415964417771946dcb7a163951913adf84644b6d (patch) | |
tree | 7c3d02dbe2970052516f2aee11dd5863caaba64f /Lib/asyncio/proactor_events.py | |
parent | a9c304cf020e2fa3ae78fd88359dfc808c9dd639 (diff) | |
download | cpython-415964417771946dcb7a163951913adf84644b6d.tar.gz cpython-415964417771946dcb7a163951913adf84644b6d.zip |
gh-113538: Add asycio.Server.{close,abort}_clients (redo) (#116784)
These give applications the option of more forcefully terminating client
connections for asyncio servers. Useful when terminating a service and
there is limited time to wait for clients to finish up their work.
This is a do-over with a test fix for gh-114432, which was reverted.
Diffstat (limited to 'Lib/asyncio/proactor_events.py')
-rw-r--r-- | Lib/asyncio/proactor_events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py index a512db6367b..397a8cda757 100644 --- a/Lib/asyncio/proactor_events.py +++ b/Lib/asyncio/proactor_events.py @@ -63,7 +63,7 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin, self._called_connection_lost = False self._eof_written = False if self._server is not None: - self._server._attach() + self._server._attach(self) self._loop.call_soon(self._protocol.connection_made, self) if waiter is not None: # only wake up the waiter when connection_made() has been called @@ -167,7 +167,7 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin, self._sock = None server = self._server if server is not None: - server._detach() + server._detach(self) self._server = None self._called_connection_lost = True |