mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Fix protocol error caused by redis-benchmark (#10236)
The protocol error was caused by the buggy `writeHandler` in `redis-benchmark.c`, which didn't handle one of the cases, thereby repeating data, leading to protocol errors when the values being sent are very long. This PR fixes #10233, issue introduced by #7959
This commit is contained in:
parent
9a0ab2fbbf
commit
bb875603fb
@ -632,6 +632,9 @@ static void writeHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
|
||||
fprintf(stderr, "Error writing to the server: %s\n", strerror(errno));
|
||||
freeClient(c);
|
||||
return;
|
||||
} else if (nwritten > 0) {
|
||||
c->written += nwritten;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
aeDeleteFileEvent(el,c->context->fd,AE_WRITABLE);
|
||||
|
Loading…
Reference in New Issue
Block a user