MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / unprotectClient

Function unprotectClient

src/networking.cpp:2182–2191  ·  view source on GitHub ↗

This will undo the client protection done by protectClient() */

Source from the content-addressed store, hash-verified

2180
2181/* This will undo the client protection done by protectClient() */
2182void unprotectClient(client *c) {
2183 AssertCorrectThread(c);
2184 if (c->flags & CLIENT_PROTECTED) {
2185 c->flags &= ~CLIENT_PROTECTED;
2186 if (c->conn) {
2187 connSetReadHandler(c->conn,readQueryFromClient, true);
2188 if (clientHasPendingReplies(c)) clientInstallWriteHandler(c);
2189 }
2190 }
2191}
2192
2193/* Like processMultibulkBuffer(), but for the inline protocol instead of RESP,
2194 * this function consumes the client query buffer and creates a command ready

Callers 2

debugCommandFunction · 0.85
evalGenericCommandFunction · 0.85

Calls 3

connSetReadHandlerFunction · 0.85
clientHasPendingRepliesFunction · 0.85

Tested by

no test coverage detected