/* Redis benchmark utility.
*
- * Copyright (c) 2009-2010, Salvatore Sanfilippo <antirez at gmail dot com>
+ * Copyright (c) 2009-2012, Salvatore Sanfilippo <antirez at gmail dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
if (config.requests_finished < config.requests)
config.latency[config.requests_finished++] = c->latency;
c->pending--;
- if (c->pending == 0) clientDone(c);
+ if (c->pending == 0) {
+ clientDone(c);
+ break;
+ }
} else {
break;
}