New submission from diekmann <diekm...@in.tum.de>:

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)

----------
components: Library (Lib)
files: socketbug.py
messages: 123534
nosy: diekmann
priority: normal
severity: normal
status: open
title: socket loses data, calling send()/sendall() on invalid socket does not 
report error and returns all bytes as written
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file19969/socketbug.py

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

Reply via email to