diff --git a/src/cluster.c b/src/cluster.c index 9cfa99a32..0cb61d858 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -4936,12 +4936,8 @@ int clusterDelSlot(int slot) { if (!n) return C_ERR; /* Cleanup the channels in master/replica as part of slot deletion. */ - list *nodes_for_slot = clusterGetNodesInMyShard(n); - serverAssert(nodes_for_slot != NULL); - listNode *ln = listSearchKey(nodes_for_slot, myself); - if (ln != NULL) { - removeChannelsInSlot(slot); - } + removeChannelsInSlot(slot); + /* Clear the slot bit. */ serverAssert(clusterNodeClearSlotBit(n,slot) == 1); server.cluster->slots[slot] = NULL; return C_OK;