nghttp: only stop ContinueTimers if they exist

Fix a crash on disconnect if --expect-continue isn't actually in use.
This commit is contained in:
Jacob Champion 2016-03-29 16:02:10 -07:00
parent 4bed7854b5
commit dfdeeb3815
1 changed files with 3 additions and 1 deletions

View File

@ -687,8 +687,10 @@ void HttpClient::disconnect() {
state = ClientState::IDLE; state = ClientState::IDLE;
for (auto req = std::begin(reqvec); req != std::end(reqvec); ++req) { for (auto req = std::begin(reqvec); req != std::end(reqvec); ++req) {
if ((*req)->continue_timer) {
(*req)->continue_timer->stop(); (*req)->continue_timer->stop();
} }
}
ev_timer_stop(loop, &settings_timer); ev_timer_stop(loop, &settings_timer);