mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: redis async close
This commit is contained in:
parent
c89bf6fbf8
commit
b383535d0f
1 changed files with 2 additions and 2 deletions
|
|
@ -247,7 +247,7 @@ class AioRedisAdapterBase(ABC):
|
|||
"""Get Redis connection."""
|
||||
pass
|
||||
|
||||
def close(self):
|
||||
async def close(self):
|
||||
"""Grace shutdown."""
|
||||
pass
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ class AioRedisAdapterV1(AioRedisAdapterBase):
|
|||
)
|
||||
return self._redis
|
||||
|
||||
def close(self):
|
||||
async def close(self):
|
||||
async with self._connection_lock:
|
||||
if self._redis and not self._redis.closed:
|
||||
self._redis.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue