[New-bugs-announce] [issue4277] asynchat's handle_error inconsistency
Giampaolo Rodola'
report at bugs.python.org
Fri Nov 7 13:15:53 CET 2008
New submission from Giampaolo Rodola' <billiejoex at users.sourceforge.net>:
Suppose you have tow sockets handled by two asynchat.async_chat class
instances and from class1 you want to send some data through class2:
class1(asynchat.async_chat):
...
def mymethod(self):
class2_instance.push_with_producer(producer)
Since push_with_producer automatically calls initiate_send() if an error
occurs while class2 reads the first chunk of data from the producer,
class1's handle_error gets called.
If the error occurs when reading the next chunks of data class2's
handle_error will be called instead.
This is an inconsistency that should be fixed so that always class2's
handle_error gets called.
The patch in attachment does that.
----------
components: Library (Lib)
files: asynchat.patch
keywords: patch
messages: 75601
nosy: giampaolo.rodola, josiah.carlson, josiahcarlson
severity: normal
status: open
title: asynchat's handle_error inconsistency
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file11959/asynchat.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4277>
_______________________________________
More information about the New-bugs-announce
mailing list