Commit 0f7e84bb authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

h2load: Always initialize timeout_watcher

parent 81add96b
......@@ -737,11 +737,11 @@ Worker::Worker(uint32_t id, SSL_CTX *ssl_ctx, size_t req_todo, size_t nclients,
auto nreqs_per_client = req_todo / nclients;
auto nreqs_rem = req_todo % nclients;
if (config->is_rate_mode()) {
// create timer that will go off every second
ev_timer_init(&timeout_watcher, second_timeout_w_cb, 0., 1.);
timeout_watcher.data = this;
} else {
// create timer that will go off every second
ev_timer_init(&timeout_watcher, second_timeout_w_cb, 0., 1.);
timeout_watcher.data = this;
if (!config->is_rate_mode()) {
for (size_t i = 0; i < nclients; ++i) {
auto req_todo = nreqs_per_client;
if (nreqs_rem > 0) {
......
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