projects
/
redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e7ef418
)
show initial querybuf bytes on querybuf overflow.
author
antirez
<antirez@gmail.com>
Fri, 25 Nov 2011 16:08:25 +0000
(17:08 +0100)
committer
antirez
<antirez@gmail.com>
Mon, 28 Nov 2011 10:12:55 +0000
(11:12 +0100)
src/networking.c
patch
|
blob
|
blame
|
history
diff --git
a/src/networking.c
b/src/networking.c
index f0da4010fe43a109461217eefa2baa76db2ec311..f1c6627ce7e356311539397a83b8394b9a35b9e8 100644
(file)
--- a/
src/networking.c
+++ b/
src/networking.c
@@
-911,9
+911,12
@@
void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
return;
}
if (sdslen(c->querybuf) > server.client_max_querybuf_len) {
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(ci);
+ sdsfree(bytes);
freeClient(c);
return;
}
freeClient(c);
return;
}