[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

Antoine Pitrou report at bugs.python.org
Tue Mar 30 18:46:48 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

> If socket.write() returns zero byte written, I'll have to wait until I
> get another chance to send my buffer. But in the meantime, some more
> data might get appended to the buffer, and the string returned by
> getvalue() will be different from the first call (and thus, I can't
> really cache it).
> 
> I could find some tricks (like using multiple buffers), but it would
> be ugly.

Right. I think we should somehow support your use case, but I'm not sure
whether it should be the default.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8240>
_______________________________________


More information about the Python-bugs-list mailing list