Skip to content

Commit 16413f1

Browse files
committed
Revert "Save a reference to created async tasks, to avoid tasks potentially disappearing (redis#2816)"
This reverts commit 56b254e.
1 parent 6b89786 commit 16413f1

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
@@ -1167,13 +1167,13 @@ def set_nodes(
11671167
if remove_old:
11681168
for name in list(old.keys()):
11691169
if name not in new:
1170-
task = asyncio.create_task(old.pop(name).disconnect()) # noqa
1170+
asyncio.create_task(old.pop(name).disconnect())
11711171

11721172
for name, node in new.items():
11731173
if name in old:
11741174
if old[name] is node:
11751175
continue
1176-
task = asyncio.create_task(old[name].disconnect()) # noqa
1176+
asyncio.create_task(old[name].disconnect())
11771177
old[name] = node
11781178

11791179
def _update_moved_slots(self) -> None:

0 commit comments

Comments
 (0)