Tom added the comment:
I ran into this while working on an asyncio application using
asyncio.start_server.
>From the documentation, I expected the combination of `close` and `wait_closed`
to wait until all connection handlers have finished. Instead, handlers remaining
running with open connect
Aymeric Augustin added the comment:
I believe this is by design: the documentation says:
> The sockets that represent existing incoming client connections are left open.
`Server` doesn't keep track of active transports serving requests.
(That said, I haven't figured out what _waiters is here
New submission from Yury Selivanov :
Server.wait_closed() currently does two checks:
1. if _sockets is None -- means that Server.close() was called
2. if self._waiters is None -- means that Server._wakeup() was called
if (1) *or* (2) is true, wait_closed() just returns without waiting on anyth