Message26960
Logged In: YES
user_id=341410
Not a bug. The control for deciding how to handle an error
in a connection is defined by the instance method
handle_error(). If you would like custom error handling in
your instances, perhaps you should subclass async_chat...
import asynchat
class MyAsyncChat(asynchat.async_chat):
error = 0
def handle_error(self):
self.error = 1
asynchat.async_chat.handle_error(self)
def push(self, data):
self.error = 0
asynchat.async_chat.push(self, data)
return self.error
Also, the fact that async_chat.push() ends up trying to send
data, is, in my opinion, a misfeature in implementation.
Under certain circumstances it can increase data throughput,
but it removes the standard asyncore.loop/poll() from the
control flow. |
|
Date |
User |
Action |
Args |
2007-08-23 14:36:28 | admin | link | issue1370380 messages |
2007-08-23 14:36:28 | admin | create | |
|