From bc678f21466a42ffc16b7dab30a2fcc763144351 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 2 Sep 2020 18:49:41 -0300 Subject: [PATCH] session close is async, fix annoying error message --- lbry/service/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbry/service/api.py b/lbry/service/api.py index f7401b4e8..2b0bcdb27 100644 --- a/lbry/service/api.py +++ b/lbry/service/api.py @@ -3493,8 +3493,8 @@ class Client(API): self.ws = await self.session.ws_connect(self.url) self.receive_messages_task = asyncio.create_task(self.receive_messages()) - def disconnect(self): - self.session.close() + async def disconnect(self): + await self.session.close() self.receive_messages_task.cancel() async def receive_messages(self):