From 3507ddbab8304802ca755d746bfd9d8a84634b21 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 6 Sep 2019 09:26:12 +0800 Subject: [PATCH] bugfix --- sqlor/dbpools.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sqlor/dbpools.py b/sqlor/dbpools.py index 5ae67d1..4a00c3e 100644 --- a/sqlor/dbpools.py +++ b/sqlor/dbpools.py @@ -69,7 +69,11 @@ class LifeConnect: asyncio.sleep(wait_time) wait_time = wait_time + 0.4 loop_cnt = loop_cnt - 1 - await self.conn.close() + try: + await self.conn.close() + except: + pass + self.conn = None await self._mkconn() raise Exception('database connect break')