Author pitrou
Recipients dsiroky, giampaolo.rodola, pitrou
Date 2011-06-10.17:11:11
SpamBayes Score 4.48526e-10
Marked as misclassified No
Message-id <>
I don't see any discrepancy here (with Python 3.3). Under both Linux and Windows, the client thread prints:

ERR [Errno 3] _ssl.c:1126: The operation did not complete (write)

The only difference is that the server thread receives 128KB under Linux, and 48KB under Windows.

I think the main variation comes not from OpenSSL, but from the OS's thread scheduling algorithms. If you do a large write, you have to be prepared to get an error, because the buffers may be too small.

I agree it might seem strange that OpenSSL returns an error rather than the number of sent bytes, and this behaviour could actually be changed at the OpenSSL level (see by allowing people to use the SSL_MODE_ENABLE_PARTIAL_WRITE option. However, doing so by default could break existing code which assumes that writes either fail or succeed completely.

issue8240 talks about a slightly related request.
Date User Action Args
2011-06-10 17:11:12pitrousetrecipients: + pitrou, giampaolo.rodola, dsiroky
2011-06-10 17:11:12pitrousetmessageid: <>
2011-06-10 17:11:12pitroulinkissue12197 messages
2011-06-10 17:11:11pitroucreate