Commit dd97b535 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

h2load: Fix division by zero if -r > -n

parent 0f7e84bb
......@@ -1320,6 +1320,12 @@ int main(int argc, char **argv) {
exit(EXIT_FAILURE);
}
if (config.rate > config.nreqs) {
std::cerr << "-r, -n: the connection rate must be smaller than or equal "
"to the number of requests." << std::endl;
exit(EXIT_FAILURE);
}
if (config.nconns != 0 && config.nconns < config.nthreads) {
std::cerr
<< "-C, -t: the total number of connections must be greater than "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment