Commit afa51016 authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Make QUIC fail streams with ERR_FAILED in CloseStaleHostConnection().

It doesn't look like this should actually fail live streams (or if it
does, there's no test for it), but it has been failing streams with
ERR_ABORTED, which is a special error code that should only be used
when the next layer up fails requests, as it has special treatment by
some consumers.

Bug: 941651
Change-Id: I3c49fe3d7961c6bd857a828bc335ea1d21f0557d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2232998
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarZhongyi Shi <zhongyi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776728}
parent 4f11b033
...@@ -467,8 +467,11 @@ class QuicStreamFactory::Job { ...@@ -467,8 +467,11 @@ class QuicStreamFactory::Job {
if (session_) { if (session_) {
QuicChromiumClientSession* session = session_; QuicChromiumClientSession* session = session_;
session_ = nullptr; session_ = nullptr;
// Use ERR_FAILED instead of ERR_ABORTED out of paranoia - ERR_ABORTED
// should only be used when the next layer up cancels a request, and has
// special semantic meaning for some consumers when they see it.
session->CloseSessionOnErrorLater( session->CloseSessionOnErrorLater(
ERR_ABORTED, quic::QUIC_STALE_CONNECTION_CANCELLED, ERR_FAILED, quic::QUIC_STALE_CONNECTION_CANCELLED,
quic::ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); quic::ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment