Serhiy Storchaka added the comment:

I doubt that it is good idea to close connection on *any* error. For example in 
_getresp() resp.decode() can raise an exception, but this failure isn't related 
to the ability of sending QUIT and other commands.

Sample error handling in your first message looks more reliable. Set special 
flags after failing command (but only if error is related to the connection), 
and ignore QUIT errors if it is set. After successful command this flag should 
be reset.

----------

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

Reply via email to