Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Issue 2851293002: Change the way BidirectionalStreamQuicImpl detects that a stream/session (Closed)

Created:
3 years, 7 months ago by Ryan Hamilton
Modified:
3 years, 7 months ago
Reviewers:
xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Change the way BidirectionalStreamQuicImpl detects that a stream/session was closed abnormally. Currently BidirectionalStreamQuicImpl::OnClose() does not invoke NotifyError if the stream and connection error codes are both NO_ERROR. However, this is not guaranteeded to be true when a stream shuts down normally. For example, if the connection is closed with QUIC_NO_ERROR (which is not expected behavior, but is possible) then NotifyError will not be invoked. Now, it turns out that the current code handles this case, perhaps inadvertantly, by invoking NotifyError in OnSessionClosed. As part of crbug.com/716563, I'm attempting to remove the upcalls from the QUIC layer to the HTTP layer, so I will be removing OnSessionClosed. In order to handle the NO_ERROR case, we need a better way to detect that a stream was closed normally. Thankfully, we can do that by checking that a fin was sent and a fin was received. This change also clears session_ in ResetStream which ensures that OnSessionClosed is not invoked after OnClose is called (and makes it more obvious that the follow-up CL to remove OnSessionClosed is safe). BUG=716563 Review-Url: https://codereview.chromium.org/2851293002 Cr-Commit-Position: refs/heads/master@{#468714} Committed: https://chromium.googlesource.com/chromium/src/+/5bc140b118c615e92e0393d8baf846d1a9bcbdba

Patch Set 1 #

Total comments: 5

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -5 lines) Patch
M net/quic/chromium/bidirectional_stream_quic_impl.cc View 2 chunks +21 lines, -5 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 15 (9 generated)
Ryan Hamilton
3 years, 7 months ago (2017-05-01 18:14:26 UTC) #3
xunjieli
lgtm with one question below. The change makes sense to me. Thank you for the ...
3 years, 7 months ago (2017-05-01 20:22:02 UTC) #4
Ryan Hamilton
Thanks! https://codereview.chromium.org/2851293002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc File net/quic/chromium/bidirectional_stream_quic_impl.cc (right): https://codereview.chromium.org/2851293002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc#newcode289 net/quic/chromium/bidirectional_stream_quic_impl.cc:289: // the delegate. On 2017/05/01 20:22:02, xunjieli wrote: ...
3 years, 7 months ago (2017-05-01 21:49:23 UTC) #5
xunjieli
still lgtm https://codereview.chromium.org/2851293002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc File net/quic/chromium/bidirectional_stream_quic_impl.cc (right): https://codereview.chromium.org/2851293002/diff/1/net/quic/chromium/bidirectional_stream_quic_impl.cc#newcode364 net/quic/chromium/bidirectional_stream_quic_impl.cc:364: if (session_) { On 2017/05/01 21:49:23, Ryan ...
3 years, 7 months ago (2017-05-02 17:32:55 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2851293002/20001
3 years, 7 months ago (2017-05-02 18:12:58 UTC) #12
commit-bot: I haz the power
3 years, 7 months ago (2017-05-02 18:44:08 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/5bc140b118c615e92e0393d8baf8...

Powered by Google App Engine
This is Rietveld 408576698