h2load: Fix crash with --timing-script option

This commit is contained in:
Tatsuhiro Tsujikawa 2015-09-02 02:34:32 +09:00
parent e1f7643c92
commit e2557059e5
1 changed files with 2 additions and 5 deletions

View File

@ -265,10 +265,7 @@ Client::Client(Worker *worker, size_t req_todo)
request_timeout_watcher.data = this; request_timeout_watcher.data = this;
} }
Client::~Client() { Client::~Client() { disconnect(); }
ev_timer_stop(worker->loop, &request_timeout_watcher);
disconnect();
}
int Client::do_read() { return readfn(*this); } int Client::do_read() { return readfn(*this); }
int Client::do_write() { return writefn(*this); } int Client::do_write() { return writefn(*this); }
@ -348,7 +345,7 @@ void Client::fail() {
void Client::disconnect() { void Client::disconnect() {
ev_timer_stop(worker->loop, &conn_inactivity_watcher); ev_timer_stop(worker->loop, &conn_inactivity_watcher);
ev_timer_stop(worker->loop, &conn_active_watcher); ev_timer_stop(worker->loop, &conn_active_watcher);
ev_timer_stop(worker->loop, &request_timeout_watcher);
streams.clear(); streams.clear();
session.reset(); session.reset();
state = CLIENT_IDLE; state = CLIENT_IDLE;