From 3426bda470b61e748400b483fa51fecf0c9c9a54 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 19 Oct 2025 11:47:08 +0800 Subject: [PATCH] bugfix --- sqlor/dbpools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sqlor/dbpools.py b/sqlor/dbpools.py index e1d5469..43bf5c9 100755 --- a/sqlor/dbpools.py +++ b/sqlor/dbpools.py @@ -64,7 +64,7 @@ class SqlorPool: if not s.used: yielded_sqlor = s if not yielded_sqlor: - yielded_sqlor = self._new_sqlor() + yielded_sqlor = await self._new_sqlor() yielded_sqlor.used = True yielded_sqlor.use_at = time.time() yield yielded_sqlor.sqlor @@ -104,6 +104,7 @@ class DBPools: pool = SqlorPool(f) self._pools[name] = pool self.e_except = None + sqlor = None try: async with pool.context() as sqlor: yield sqlor