This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients jcea, pitrou, vstinner
Date 2011-06-16.14:07:35
SpamBayes Score 2.7821956e-05
Marked as misclassified No
Message-id <1308233256.64.0.032072932171.issue12343@psf.upfronthosting.co.za>
In-reply-to
Content
> If now I can get a "retry" while writing, what is the logic?. Does
> Python retry automatically, internally?.

No, Python doesn't retry automatically. You have to call send() again with the same buffer.
(if Python retried, it would make non-blocking calls blocking)

Also, the args[0] of the SSL error tells you what the SSL layer is blocking on (SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE). 

Also, with the current setup, non-blocking write() will never succeed with a partial write. See issue12197.
(that doesn't mean nothing is written on the network, though. OpenSSL may start emitting bytes and keep track internally of what remains to be sent. The OpenSSL documentation isn't very clear on that, IIRC)

> I think SSL module documentation should write down this captchas when 
> using non-blocking sockets. That is, that read/write can raise
> exceptions even if "select" was OK.

Agreed.

Relatedly, there's issue10084 for SSL support in asyncore.
History
Date User Action Args
2011-06-16 14:07:36pitrousetrecipients: + pitrou, jcea, vstinner
2011-06-16 14:07:36pitrousetmessageid: <1308233256.64.0.032072932171.issue12343@psf.upfronthosting.co.za>
2011-06-16 14:07:36pitroulinkissue12343 messages
2011-06-16 14:07:35pitroucreate