MCPcopy Create free account
hub / github.com/F-Stack/f-stack / freeClusterLink

Function freeClusterLink

app/redis-6.2.6/src/cluster.c:640–650  ·  view source on GitHub ↗

Free a cluster link, but does not free the associated node of course. * This function will just make sure that the original node associated * with this link will have the 'link' field set to NULL. */

Source from the content-addressed store, hash-verified

638 * This function will just make sure that the original node associated
639 * with this link will have the 'link' field set to NULL. */
640void freeClusterLink(clusterLink *link) {
641 if (link->conn) {
642 connClose(link->conn);
643 link->conn = NULL;
644 }
645 sdsfree(link->sndbuf);
646 zfree(link->rcvbuf);
647 if (link->node)
648 link->node->link = NULL;
649 zfree(link);
650}
651
652static void clusterConnAcceptHandler(connection *conn) {
653 clusterLink *link;

Callers 7

freeClusterNodeFunction · 0.85
clusterProcessPacketFunction · 0.85
handleLinkIOErrorFunction · 0.85
clusterCronFunction · 0.85

Calls 3

connCloseFunction · 0.85
sdsfreeFunction · 0.85
zfreeFunction · 0.70

Tested by

no test coverage detected