h2load goes into infinite loop when timing script file starts with 0.0 in first line

This commit is contained in:
Kit Chan 2015-11-23 09:58:38 +00:00
parent e95ad297ed
commit 718f7a5f7e
1 changed files with 6 additions and 2 deletions

View File

@ -742,11 +742,15 @@ int Client::connection_made() {
break; break;
} }
duration = config.timings[reqidx]; duration = config.timings[reqidx];
if(reqidx == 0) //if reqidx wraps around back to 0, we uses up all lines and should break
break;
} }
if (duration >= 1e-9) { //double check since we may have break due to reqidx wraps around back to 0
request_timeout_watcher.repeat = duration; request_timeout_watcher.repeat = duration;
ev_timer_again(worker->loop, &request_timeout_watcher); ev_timer_again(worker->loop, &request_timeout_watcher);
} }
}
signal_write(); signal_write();
return 0; return 0;