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

Function disconnectSlaves

app/redis-6.2.6/src/networking.c:1208–1215  ·  view source on GitHub ↗

Close all the slaves connections. This is useful in chained replication * when we resync with our own master and want to force all our slaves to * resync with us as well. */

Source from the content-addressed store, hash-verified

1206 * when we resync with our own master and want to force all our slaves to
1207 * resync with us as well. */
1208void disconnectSlaves(void) {
1209 listIter li;
1210 listNode *ln;
1211 listRewind(server.slaves,&li);
1212 while((ln = listNext(&li))) {
1213 freeClient((client*)ln->value);
1214 }
1215}
1216
1217/* Check if there is any other slave waiting dumping RDB finished expect me.
1218 * This function is useful to judge current dumping RDB can be used for full

Callers 4

syncWithMasterFunction · 0.85
replicationSetMasterFunction · 0.85
replicationUnsetMasterFunction · 0.85

Calls 3

listRewindFunction · 0.85
listNextFunction · 0.85
freeClientFunction · 0.70

Tested by

no test coverage detected