Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

show initial querybuf bytes on querybuf overflow.

  • Loading branch information...
commit 0f2199ec29d98149be5c0c405865b20e9542fece 1 parent 241e3cf
Salvatore Sanfilippo authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/networking.c
7 src/networking.c
View
@@ -869,9 +869,12 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
return;
}
if (sdslen(c->querybuf) > server.client_max_querybuf_len) {
- sds ci = getClientInfoString(c);
- redisLog(REDIS_WARNING,"Closing client that reached max query buffer length: %s", ci);
+ sds ci = getClientInfoString(c), bytes = sdsempty();
+
+ bytes = sdscatrepr(bytes,c->querybuf,64);
+ redisLog(REDIS_WARNING,"Closing client that reached max query buffer length: %s (qbuf initial bytes: %s)", ci, bytes);
sdsfree(ci);
+ sdsfree(bytes);
freeClient(c);
return;
}
Please sign in to comment.
Something went wrong with that request. Please try again.