Note: I am aware that I can use a timeout to prevent infinite hanging. I am also aware that it is not guaranteed to get a close notification over the network. However, for calls that may normally take a long time to complete, being notified of a closed connection (if possible) when it occurs is useful to allow for faster retries/faster cleanup of resources.
To demonstrate, I have two webservers below. gevent_server.py and gruvi_server.py. It does not matter which server you run for this issue (they are both included just to demonstrate that the issue is on the client, not the server side).
I have also included two clients: urllib3_client.py and gruvi_client.py. urllib3_client.py detects the closed connection and raises an exception, while gruvi_client.py does not give any indication that anything has happenned.
It would be nice if the client could give some indication (via an exception preferably) that the connection has been closed.
I am assuming that there are other client errors other than connection close that are probably being ignored here as well. My guess is that error results are being ignored from whatever pyuv call is being made to read data, similar to issue#9.
Note: I am aware that I can use a timeout to prevent infinite hanging. I am also aware that it is not guaranteed to get a close notification over the network. However, for calls that may normally take a long time to complete, being notified of a closed connection (if possible) when it occurs is useful to allow for faster retries/faster cleanup of resources.
To demonstrate, I have two webservers below. gevent_server.py and gruvi_server.py. It does not matter which server you run for this issue (they are both included just to demonstrate that the issue is on the client, not the server side).
I have also included two clients: urllib3_client.py and gruvi_client.py. urllib3_client.py detects the closed connection and raises an exception, while gruvi_client.py does not give any indication that anything has happenned.
It would be nice if the client could give some indication (via an exception preferably) that the connection has been closed.
I am assuming that there are other client errors other than connection close that are probably being ignored here as well. My guess is that error results are being ignored from whatever pyuv call is being made to read data, similar to issue#9.
Client output:
gruvi_client.py
urllib3_client.py
gruvi_server.py
gevent_server.py