Unverified Commit 119121c7 authored by Yang Bodong's avatar Yang Bodong Committed by GitHub
Browse files

Verbose log enhancement: print client info when client exit (#9053)

It could be useful for debugging to know which client got disconnected.
parent e16d3eb9
...@@ -2166,7 +2166,11 @@ void readQueryFromClient(connection *conn) { ...@@ -2166,7 +2166,11 @@ void readQueryFromClient(connection *conn) {
return; return;
} }
} else if (nread == 0) { } else if (nread == 0) {
serverLog(LL_VERBOSE, "Client closed connection"); if (server.verbosity <= LL_VERBOSE) {
sds info = catClientInfoString(sdsempty(), c);
serverLog(LL_VERBOSE, "Client closed connection %s", info);
sdsfree(info);
}
freeClientAsync(c); freeClientAsync(c);
return; return;
} else if (c->flags & CLIENT_MASTER) { } else if (c->flags & CLIENT_MASTER) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment