From 3c9c2c3f8472f2b030042ea4736e575c09437e4f Mon Sep 17 00:00:00 2001 From: Rajeev Ranjan Date: Fri, 23 Oct 2020 12:43:25 +0530 Subject: [PATCH] Fix Ethereum connector asyncio loop Replace nested run_until_complete() with create_task() in Ethereum connector. The evet loop once started cannot be started again from within a coroutine. Signed-off-by: Rajeev Ranjan --- .../ethereum/ethereum_connector/ethereum_connector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockchain_connector/ethereum/ethereum_connector/ethereum_connector.py b/blockchain_connector/ethereum/ethereum_connector/ethereum_connector.py index 881e7b9c3..60f0429a0 100644 --- a/blockchain_connector/ethereum/ethereum_connector/ethereum_connector.py +++ b/blockchain_connector/ethereum/ethereum_connector/ethereum_connector.py @@ -94,7 +94,7 @@ def workorder_event_handler_func(event, account, contract): try: daemon = EventProcessor(self._config) - asyncio.get_event_loop().run_until_complete(daemon.start( + asyncio.get_event_loop().create_task(daemon.start( listener, workorder_event_handler_func, account=None,