I seem to misinterpret the rules of dataReceived
and inlineCallbacks
.
More specifically, when I do this:
def dataReceived(self, data):
self.transport.write('ok')
my Protocol really sends the data, but when I do this:
@defer.inlineCallbacks
def dataReceived(self, data):
a = yield True # this stands for some adbapi call actually
self.transport.write('ok')
I receive nothing, then connection just closes. Nor the defer.returnValue helps here, behaviour is just similar.
Kindly explain.