[issue8493] socket's send can raise errno 35 under OS X, which causes problems in sendall

Matthew Cowles report at bugs.python.org
Fri Apr 23 17:43:59 CEST 2010


Matthew Cowles <mdcowles at users.sourceforge.net> added the comment:

> if you get this type of error, it's probably because you're using non-
> blocking sockets

That's what I thought at first too. But the user's sockets were set to blocking.

> spinning around the send call trying to resend the data isn't going to 
> improve things, you should probably wait a little before retrying

The user switched to using send() and adding a short delay before retrying the send solved the problem.

In fact, I think it's a little silly that OS X raises the error rather than just saying that 0 bytes were sent (which is what I suppose that other OSes do).

But I think it's also not ideal that Python's socket.sendall() can't be used with confidence under OS X because it can fail under pretty normal circumstances.

----------

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


More information about the Python-bugs-list mailing list