import asyncio
loop = asyncio.get_event_loop()
server = await loop.create_server(...)
try:
async with sevrer:
await server.serve_forever()
except asyncio.CancelledError: # Client still alive
print(server.sockets) # ()
Seem I cannot get all alive connections or kill them by public api π¦
The left connections keeps until python executable exits.
What show I do?