This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Isaac Boukris
Recipients Isaac Boukris, asvetlov, eamanu, giampaolo.rodola, josiahcarlson, stutzbach
Date 2019-02-06.20:13:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549484002.78.0.176026256294.issue35913@roundup.psfhosted.org>
In-reply-to
Content
> 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).
History
Date User Action Args
2019-02-06 20:13:24Isaac Boukrissetrecipients: + Isaac Boukris, josiahcarlson, giampaolo.rodola, stutzbach, asvetlov, eamanu
2019-02-06 20:13:22Isaac Boukrissetmessageid: <1549484002.78.0.176026256294.issue35913@roundup.psfhosted.org>
2019-02-06 20:13:22Isaac Boukrislinkissue35913 messages
2019-02-06 20:13:22Isaac Boukriscreate