Isaac Boukris <ibouk...@gmail.com> added the comment:

> It seems recv() returning b"" is an alias for "connection lost". E.g. in 
> Twisted:

To my understanding, technically the connection is not fully closed, it is just 
shut-down for reading but we can still perform write operations on it (that is, 
the client may be still waiting for the response). I can reproduce it with an 
http-1.0 client, I'll try to put up a test to demonstrate it more clearly.

>From recv() man page:
When a stream socket peer has performed an orderly shutdown, the return value 
will be 0 (the traditional "end-of-file" return).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35913>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to