diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 86421e33f..16c0d8d64 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -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);