Message334978
| 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). |
|