Giampaolo Rodola' <g.rod...@gmail.com> added the comment:

> When the remote end disconnects, handle_close is only called if recv
> is called (from handle_read).

Actually this isn't true; handle_close() is also called in send():
http://hg.python.org/cpython/file/eb2991f7cdc8/Lib/asyncore.py#l364

I'd say your patch can be useful only in case the dispatcher subclass doesn't 
send() neither recv() any data, in which case the connection is supposed to 
remain open forever.
On one hand this might be a good thing, on the other hand I'm not sure what the 
repercussions might be in the existing code base out there. Probably none, 
but...

Perhaps you could provide more info about why you needed to do this in the 
first place.
Did you encounter a specific use case requiring this patch in order to work?
If so, please paste the code where you subclassed asyncore.dispatcher.

----------

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

Reply via email to