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 giampaolo.rodola
Recipients flox, giampaolo.rodola, janssen, pitrou, vstinner
Date 2010-03-12.20:05:23
SpamBayes Score 0.0007714994
Marked as misclassified No
Message-id <1268424325.82.0.845003694504.issue8108@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not sure this should be handled in ssl.py.
ssl.py correctly raises ERROR_WANT_READ/WRITE if the shutdown operation didn't complete and that's ok.
It should be up to the upper application (in our case asyncore) to deal with that.

Moreover, the patch tries to solve the issue by using a while loop which is *evil* for asynchronous environments (a similar problem is debated in issue 3890).

My suggestion is to modify the SSLConnection.close() method of the test server so that it just "return" in case of ERROR_WANT_READ/WRITE errors without calling the original asyncore's close method since the socket object must remain in the select loop as long as the connection is still around.

A subsequent call to handle_read() and/or handle_write() should not be necessary as they should automatically be called by asyncore on the next poll() loop but I'm not 100% sure about this. 

In both cases I'd say that the only thing needed to be fixed here is the test server.
History
Date User Action Args
2010-03-12 20:05:25giampaolo.rodolasetrecipients: + giampaolo.rodola, janssen, pitrou, vstinner, flox
2010-03-12 20:05:25giampaolo.rodolasetmessageid: <1268424325.82.0.845003694504.issue8108@psf.upfronthosting.co.za>
2010-03-12 20:05:24giampaolo.rodolalinkissue8108 messages
2010-03-12 20:05:24giampaolo.rodolacreate