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

Function removeClientFromTimeoutTable

app/redis-6.2.6/src/timeout.c:125–132  ·  view source on GitHub ↗

Remove the client from the table when it is unblocked for reasons * different than timing out. */

Source from the content-addressed store, hash-verified

123/* Remove the client from the table when it is unblocked for reasons
124 * different than timing out. */
125void removeClientFromTimeoutTable(client *c) {
126 if (!(c->flags & CLIENT_IN_TO_TABLE)) return;
127 c->flags &= ~CLIENT_IN_TO_TABLE;
128 uint64_t timeout = c->bpop.timeout;
129 unsigned char buf[CLIENT_ST_KEYLEN];
130 encodeTimeoutKey(buf,timeout,c);
131 raxRemove(server.clients_timeout_table,buf,sizeof(buf),NULL);
132}
133
134/* This function is called in beforeSleep() in order to unblock clients
135 * that are waiting in blocking operations with a timeout set. */

Callers 1

unblockClientFunction · 0.85

Calls 2

encodeTimeoutKeyFunction · 0.85
raxRemoveFunction · 0.85

Tested by

no test coverage detected