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,7 +687,9 @@ void HttpClient::disconnect() {
state = ClientState::IDLE;
for (auto req = std::begin(reqvec); req != std::end(reqvec); ++req) {
(*req)->continue_timer->stop();
if ((*req)->continue_timer) {
(*req)->continue_timer->stop();
}
}
ev_timer_stop(loop, &settings_timer);