(moved from bug 7636:) If you shut down the service with an active connection, then you get a ResourceWarning for that socket and transport: > 2023-12-28 10:05:41 INFO vsmserver: Got SIGTERM, signaling process to quit > 2023-12-28 10:05:41 INFO vsmserver: Terminating. Have a nice day! > sys:1: ResourceWarning: unclosed <socket.socket fd=6, family=10, type=1, proto=6, laddr=('::1', 9000, 0, 0), raddr=('::1', 60516, 0, 0)> > ResourceWarning: Enable tracemalloc to get the object allocation traceback > /usr/lib64/python3.12/asyncio/selector_events.py:875: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=6> > _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) > ResourceWarning: Enable tracemalloc to get the object allocation traceback There doesn't seem to be any mechanism to terminate ongoing connections. I've reported this problem here: https://github.com/python/cpython/issues/113538
Also note bug 8224, comment 80, where a similar issue occurred and was (mostly?) resolved. In that case, the issue was with outgoing connections, whilst this bug here is about incoming connections.