diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index bf18d2ab..5ab2625d 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -592,6 +592,11 @@ int showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData REDIS_NOTUSED(id); REDIS_NOTUSED(clientData); + if (config.liveclients == 0) { + fprintf(stderr,"All clients disconnected... aborting."); + exit(1); + } + if (config.csv) return 250; float dt = (float)(mstime()-config.start)/1000.0; float rps = (float)config.requests_finished/dt;