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 diekmann
Recipients diekmann
Date 2010-12-07.09:01:24
SpamBayes Score 1.9984014e-15
Marked as misclassified No
Message-id <1291712486.57.0.709018850853.issue10644@psf.upfronthosting.co.za>
In-reply-to
Content
Calling send()/sendall() on an invalid socket does not report an error and returns all bytes as written. Thus, all bytes written to the socket are lost and the application is not informed about that and treats the bytes as successfully sent. The bytes given to the socket are silently lost, this cannot be recovered.

The attached file includes an example to reproduce this problem. I defined an invalid socket, when the other side of the connection has closed the connection.

Steps to reproduce (see attached file for python implementation):
1) Create listening socket
2) let client connect to it
2.1) send something to the client (optional step)
3) Client terminates connection (now the socket on the server side is invalid)
4) Server calls send/sendall <--- No Error here, but everything is lost
5) Server calls send/sendall again (Now we get the required error)
History
Date User Action Args
2010-12-07 09:01:26diekmannsetrecipients: + diekmann
2010-12-07 09:01:26diekmannsetmessageid: <1291712486.57.0.709018850853.issue10644@psf.upfronthosting.co.za>
2010-12-07 09:01:24diekmannlinkissue10644 messages
2010-12-07 09:01:24diekmanncreate