Giampaolo Rodola' <billiej...@users.sourceforge.net> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8108>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to