#3846·redis-py

async cluster does not close

Author: amirreza-sf80Created Nov 15, 2025Updated Aug 7, 2026

hi the async version of cluster client does not close properly when calling aclose

python
In [1]: from redis.asyncio.cluster import RedisCluster

In [2]: rc = await RedisCluster(host="localhost", port=7000)

In [3]: await rc.set("a", "b")
Out[3]: True

In [4]: await rc.get("a")
Out[4]: b'b'

In [5]: await rc.aclose()

In [6]: await rc.set("a", "c")
Out[6]: True

In [7]: await rc.get("a")
Out[7]: b'c'

as you can see, even after aclose is called, you can still call operations this is not the case with sync client

python
In [8]: from redis.cluster import RedisCluster

In [9]: rc = RedisCluster(host="localhost", port=7000)

In [10]: rc.set("a", "b")
Out[10]: True

In [11]: rc.get("a")
Out[11]: b'b'

In [12]: rc.close()

In [13]: rc.get("a")
...

AttributeError: 'NoneType' object has no attribute 'redis_connection'