Schedule push_msg into a task

This commit is contained in:
NIC619 2019-08-05 18:15:48 +08:00
parent 2bb7f42c20
commit a2efd03dfa
No known key found for this signature in database
GPG Key ID: 570C35F5C2D51B17

View File

@ -151,7 +151,7 @@ class Pubsub:
continue continue
# TODO(mhchia): This will block this read_stream loop until all data are pushed. # TODO(mhchia): This will block this read_stream loop until all data are pushed.
# Should investigate further if this is an issue. # Should investigate further if this is an issue.
await self.push_msg(msg_forwarder=peer_id, msg=msg) asyncio.ensure_future(self.push_msg(msg_forwarder=peer_id, msg=msg))
if rpc_incoming.subscriptions: if rpc_incoming.subscriptions:
# deal with RPC.subscriptions # deal with RPC.subscriptions