Use self._try_inline_read()

This commit is contained in:
ayanamist 2013-02-28 13:18:05 +08:00
parent c06c93d723
commit 7974e86e3c

View file

@ -115,7 +115,7 @@ class ConnHandler(PairedStream):
def on_remote_connected(self):
self.read_until_close(callback=self.on_client_read, streaming_callback=self.on_client_read)
self.remote.read_until_close(callback=self.on_remote_read, streaming_callback=self.on_remote_read)
self._read_from_buffer() # We must call this to empty filled buffer otherwise nothing will be read in again.
self._try_inline_read() # We must call this to empty filled buffer otherwise nothing will be read in again.
def on_client_read(self, data):
if data and not self.remote.closed():