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 janssen
Recipients flox, giampaolo.rodola, janssen, pitrou, vstinner
Date 2010-03-12.19:48:35
SpamBayes Score 3.3432798e-07
Marked as misclassified No
Message-id <1268423317.86.0.118445867506.issue8108@psf.upfronthosting.co.za>
In-reply-to
Content
What's happening is that the new state returns from SSL_shutdown() are saying, "the shutdown you asked for didn't happen this time, but call me again when you get a chance.  And here is a hint about why it didn't happen, so that if you are sophisticated enough, you can get better information about whether subsequent calls to shutdown() will succeed."

Given the underlying architectures we are dealing with, is it possible to handle this properly?  Basically, what the SSL_shutdown code is saying is that all higher-level event loops should understand an additional kind of event, "shutting down the SSL socket", on a par with "read bytes" and "write bytes".  But our event processing handlers, like asyncore, basically only deal with read and write.  I don't see how to tell them that a "close" operation should turn into a "read" or "write".

We could also think about turning non-blocking sockets into blocking sockets, by adding a time.sleep(0.1) and re-calling SSL_shutdown().  But maybe the right thing to do would be for the write handler in the asyncore loop to catch this, and re-try the write when it gets a chance.
History
Date User Action Args
2010-03-12 19:48:37janssensetrecipients: + janssen, pitrou, vstinner, giampaolo.rodola, flox
2010-03-12 19:48:37janssensetmessageid: <1268423317.86.0.118445867506.issue8108@psf.upfronthosting.co.za>
2010-03-12 19:48:36janssenlinkissue8108 messages
2010-03-12 19:48:35janssencreate