[issue27386] Asyncio server hang when clients connect and immediately disconnect

Jim Fulton report at bugs.python.org
Wed Jun 29 12:21:29 EDT 2016


Jim Fulton added the comment:

Guido, are you saying that the script runs without hanging for you?
(If you get a boatload of tracebacks, that's due to another asyncio bug in error handling.)

Are you running the version with prints?

This is an adaptation of the echo server and client from the docs.

The server runs in a thread.  It just echos it's input.

The client just waits for a message from the server, and then send messages (one in attached echo2.py) and waits for replies. When I run this on Mac and ubuntu 14.04, the server never sees the messages sent by the client.

I'm uploading a newer version that simplifies the messages data structure and adds some prints to, I think, make the sequence easier to see.

Fixing the bug that causes all the tracebacks to be printed would also make this easier to interpret.

Commenting out the code that makes and closes the socket connections with SO_LINGER and running echo2.py should also make it easy to see the trivial expected client/server interaction.

I don't think the details of the interaction between the server and the client are very important, other than the fact that the client gets the first message from the server and the server doesn't get the subsequent message from the client.

----------
Added file: http://bugs.python.org/file43582/echo2.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27386>
_______________________________________


More information about the Python-bugs-list mailing list