Merge pull request #63 from zixuanzh/chat-hotfix

Dialer should not read until user says so.
This commit is contained in:
Robert Zajac 2018-11-18 16:16:35 -05:00 committed by GitHub
commit 01daf8ae8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,10 @@ class MuxedConn(IMuxedConn):
self.streams = {}
self.stream_queue = asyncio.Queue()
asyncio.ensure_future(self.handle_incoming())
# The initiator need not read upon construction time.
# It should read when the user decides that it wants to read from the constructed stream.
if not initiator:
asyncio.ensure_future(self.handle_incoming())
def close(self):
"""