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

Function migrateCloseTimedoutSockets

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

Source from the content-addressed store, hash-verified

5307}
5308
5309void migrateCloseTimedoutSockets(void) {
5310 dictIterator *di = dictGetSafeIterator(server.migrate_cached_sockets);
5311 dictEntry *de;
5312
5313 while((de = dictNext(di)) != NULL) {
5314 migrateCachedSocket *cs = dictGetVal(de);
5315
5316 if ((server.unixtime - cs->last_use_time) > MIGRATE_SOCKET_CACHE_TTL) {
5317 connClose(cs->conn);
5318 zfree(cs);
5319 dictDelete(server.migrate_cached_sockets,dictGetKey(de));
5320 }
5321 }
5322 dictReleaseIterator(di);
5323}
5324
5325/* MIGRATE host port key dbid timeout [COPY | REPLACE | AUTH password |
5326 * AUTH2 username password]

Callers 1

serverCronFunction · 0.85

Calls 6

dictGetSafeIteratorFunction · 0.85
connCloseFunction · 0.85
dictNextFunction · 0.70
zfreeFunction · 0.70
dictDeleteFunction · 0.70
dictReleaseIteratorFunction · 0.70

Tested by

no test coverage detected