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:
parent
4bed7854b5
commit
dfdeeb3815
|
@ -687,7 +687,9 @@ 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) {
|
||||||
(*req)->continue_timer->stop();
|
if ((*req)->continue_timer) {
|
||||||
|
(*req)->continue_timer->stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ev_timer_stop(loop, &settings_timer);
|
ev_timer_stop(loop, &settings_timer);
|
||||||
|
|
Loading…
Reference in New Issue