Ronald Oussoren <ronaldousso...@mac.com> added the comment:

The second link contains an explanation of what's going on, and that this is 
unexpected behaviour of the macOS kernel.

I'm not sure what we could do about this, the blog post explains that this 
error can happen when send(2) is called while the socket is teared down. A 
possible workaround (based on reading the blog post and without fully analysing 
the side effects) is to treat EPROTOTYPE the same as EGAIN in the python 
wrappers for send/write/sendto. 

That's easier said than done though, socketmodule.c indirectly calls socket 
functions through a helper function that does some bookkeeping (including 
handling EGAIN) and is used for more than just the send calls.

----------

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

Reply via email to