From a2efd03dfab6a337a7152fed414bb282f13242be Mon Sep 17 00:00:00 2001 From: NIC619 Date: Mon, 5 Aug 2019 18:15:48 +0800 Subject: [PATCH] Schedule `push_msg` into a task --- libp2p/pubsub/pubsub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/pubsub/pubsub.py b/libp2p/pubsub/pubsub.py index b367fe9..5402cac 100644 --- a/libp2p/pubsub/pubsub.py +++ b/libp2p/pubsub/pubsub.py @@ -151,7 +151,7 @@ class Pubsub: continue # TODO(mhchia): This will block this read_stream loop until all data are pushed. # 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: # deal with RPC.subscriptions