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

Issue 2913413002: Groundwork for cancelling quartc streams after a deadline is exceeded. (Closed)

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

Description

Groundwork for cancelling quartc streams after a deadline is exceeded. In the quic/quartc wrapper: - Adds a method to QuartcSessionInterface to cancel a stream by number - Fixes stream error code reporting - Fixes spurious reset frames sent with QUIC_RST_STREAM_ACKNOWLEDGEMENT This is done by number on QuartcSessionInterface instead of by a method on a stream (or by passing the session a pointer to the stream) because the quartc session owns quartc streams and may delete them before the deadline. Under the covers, the CancelStream method resets a stream with error code 6 (QUIC_STREAM_CANCELLED). QuartcStream currently only reports a non-zero error code if there's a connection error. This cl rectifies that by exposing both stream_error() and connection_error() and letting callers examine whichever one they want. Since Quartc only sends on outgoing streams, it never sent a fin on incoming streams. This led to it not closing incoming streams cleanly. Whenever it closed an incoming stream, it sent a reset frame with the error code QUIC_RST_STREAM_ACKNOWLEDGEMENT, in order to communicate a final byte offset. This isn't necessary, since we never send anything (the final offset is always 0). Instead, we now close the reverse direction (sending on inbound streams, receiving on outbound streams) immediately on stream creation, by simulating a fin. This prevents spurious reset frames that look like errors. In quartc: - Adds CancelStream to the thread-safe wrapper - Adds an optional parameter to SendOutgoingFrame to set a deadline - Fixes incorrectly ordered boolean parameters in the quartc_connection_test SendOutgoingFrame will now schedule a task to cancel a stream if it is given a non-infinite deadline. The new deadline parameter defaults to infinite to preserve current behavior. We'll likely only use this for video and audio streams, not for data and control streams. n/a (only linked by quartc) Merge internal change: 157132817 R=rch@chromium.org BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -3 lines) Patch
M net/quic/quartc/quartc_session.h View 3 chunks +5 lines, -0 lines 0 comments Download
M net/quic/quartc/quartc_session.cc View 2 chunks +21 lines, -1 line 0 comments Download
M net/quic/quartc/quartc_session_interface.h View 2 chunks +9 lines, -0 lines 0 comments Download
M net/quic/quartc/quartc_stream.h View 1 chunk +4 lines, -0 lines 0 comments Download
M net/quic/quartc/quartc_stream.cc View 2 chunks +9 lines, -1 line 0 comments Download
M net/quic/quartc/quartc_stream_interface.h View 2 chunks +5 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 2 (0 generated)
Jana
3 years, 6 months ago (2017-06-01 06:43:18 UTC) #1
Ryan Hamilton
3 years, 6 months ago (2017-06-01 15:22:15 UTC) #2
lgtm

Powered by Google App Engine
This is Rietveld 408576698