nghttpx: Fix possible crash in rare case
This commit is contained in:
parent
dd2bdf3e31
commit
ab734f09b6
|
@ -1728,6 +1728,11 @@ int Http2Upstream::on_downstream_reset(bool no_retry) {
|
|||
for (auto downstream = downstream_queue_.get_downstreams(); downstream;
|
||||
downstream = downstream->dlnext) {
|
||||
if (downstream->get_dispatch_state() != Downstream::DISPATCH_ACTIVE) {
|
||||
// This is error condition when we failed push_request_headers()
|
||||
// in initiate_downstream(). Otherwise, we have
|
||||
// Downstream::DISPATCH_ACTIVE state, or we did not set
|
||||
// DownstreamConnection.
|
||||
downstream->pop_downstream_connection();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1224,6 +1224,11 @@ int SpdyUpstream::on_downstream_reset(bool no_retry) {
|
|||
for (auto downstream = downstream_queue_.get_downstreams(); downstream;
|
||||
downstream = downstream->dlnext) {
|
||||
if (downstream->get_dispatch_state() != Downstream::DISPATCH_ACTIVE) {
|
||||
// This is error condition when we failed push_request_headers()
|
||||
// in initiate_downstream(). Otherwise, we have
|
||||
// Downstream::DISPATCH_ACTIVE state, or we did not set
|
||||
// DownstreamConnection.
|
||||
downstream->pop_downstream_connection();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue