Skip to content

Commit 81bfe40

Browse files
committed
Revert "Save a reference to created async tasks, to avoid tasks potentially disappearing (redis#2816)"
This reverts commit 56b254e.
1 parent 3a0c724 commit 81bfe40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redis/asyncio/cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,13 +1194,13 @@ def set_nodes(
11941194
if remove_old:
11951195
for name in list(old.keys()):
11961196
if name not in new:
1197-
task = asyncio.create_task(old.pop(name).disconnect()) # noqa
1197+
asyncio.create_task(old.pop(name).disconnect())
11981198

11991199
for name, node in new.items():
12001200
if name in old:
12011201
if old[name] is node:
12021202
continue
1203-
task = asyncio.create_task(old[name].disconnect()) # noqa
1203+
asyncio.create_task(old[name].disconnect())
12041204
old[name] = node
12051205

12061206
def _update_moved_slots(self) -> None:

0 commit comments

Comments
 (0)