fixed buffers to wrap channel.send_exception with spawn, so that it doesn't block the mainloop

This commit is contained in:
Denis Bilenko
2008-11-05 17:06:19 +06:00
parent 85e5e7f1bd
commit 80d36400aa
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ class Protocol(twistedProtocol):
spawn(self.channel.send, data)
def connectionLost(self, reason):
self.channel.send_exception(reason.value)
spawn(self.channel.send_exception, reason.value)
self.channel = None # QQQ channel creates a greenlet. does it actually finish and memory is reclaimed?

View File

@@ -9,7 +9,7 @@ class LineOnlyReceiver(basic.LineOnlyReceiver):
spawn(self.channel.send, line)
def connectionLost(self, reason):
self.channel.send_exception(reason.value)
spawn(self.channel.send_exception, reason.value)
class LineOnlyReceiverBuffer(BaseBuffer):