Author nikratio
Recipients christian.heimes, giampaolo.rodola, janssen, nikratio, pitrou
Date 2014-03-16.21:52:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1395006732.61.0.629868220906.issue20951@psf.upfronthosting.co.za>
In-reply-to
Content
This is actually seems to be not just an inconvience, but a real bug: since SSLSocket.sendall() uses SSLSocket.send() internally, the former method will busy-loop when called on a non-blocking socket. 

Note also that the .sendto and .write methods already behave consistently and raise SSLWantWrite. It seems it's really just the send() method that is the lone outlier.

The attached patch changes ssl.send to raise SSLWantWrite instead of returning zero. The  full testsuite still runs fine. I'm a bit sceptical though, because the code looks as if send() was deliberately written to catch the SSLWantWrite exception and return zero instead.. Can anyone familiar with the code comment on this?
History
Date User Action Args
2014-03-16 21:52:12nikratiosetrecipients: + nikratio, janssen, pitrou, giampaolo.rodola, christian.heimes
2014-03-16 21:52:12nikratiosetmessageid: <1395006732.61.0.629868220906.issue20951@psf.upfronthosting.co.za>
2014-03-16 21:52:12nikratiolinkissue20951 messages
2014-03-16 21:52:12nikratiocreate