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

Issue 19668013: Add 'deadline' to HttpResponse, making it possible to give a max duration for the liveness of the r… (Closed)

Created:
7 years, 5 months ago by Anders Johnsen
Modified:
7 years, 5 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add 'deadline' to HttpResponse, making it possible to give a max duration for the liveness of the response. BUG=https://code.google.com/p/dart/issues/detail?id=8425 R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=25408

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add missing test. #

Total comments: 2

Patch Set 3 : Clean up timers. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -6 lines) Patch
M sdk/lib/io/http.dart View 1 chunk +12 lines, -0 lines 0 comments Download
M sdk/lib/io/http_impl.dart View 6 chunks +22 lines, -6 lines 0 comments Download
A tests/standalone/io/http_response_deadline_test.dart View 1 2 1 chunk +93 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Anders Johnsen
7 years, 5 months ago (2013-07-24 10:32:50 UTC) #1
Søren Gjesse
lgtm https://codereview.chromium.org/19668013/diff/1/sdk/lib/io/http_impl.dart File sdk/lib/io/http_impl.dart (right): https://codereview.chromium.org/19668013/diff/1/sdk/lib/io/http_impl.dart#newcode1116 sdk/lib/io/http_impl.dart:1116: final Socket socket; _socket.
7 years, 5 months ago (2013-07-24 11:29:26 UTC) #2
Anders Johnsen
PTAL, was missing the test. https://codereview.chromium.org/19668013/diff/1/sdk/lib/io/http_impl.dart File sdk/lib/io/http_impl.dart (right): https://codereview.chromium.org/19668013/diff/1/sdk/lib/io/http_impl.dart#newcode1116 sdk/lib/io/http_impl.dart:1116: final Socket socket; On ...
7 years, 5 months ago (2013-07-24 12:16:25 UTC) #3
Søren Gjesse
lgtm https://codereview.chromium.org/19668013/diff/5001/tests/standalone/io/http_response_deadline_test.dart File tests/standalone/io/http_response_deadline_test.dart (right): https://codereview.chromium.org/19668013/diff/5001/tests/standalone/io/http_response_deadline_test.dart#newcode47 tests/standalone/io/http_response_deadline_test.dart:47: return new Future.delayed(const Duration(milliseconds: 500), () { Even ...
7 years, 5 months ago (2013-07-24 12:29:51 UTC) #4
Anders Johnsen
Committed patchset #3 manually as r25408 (presubmit successful).
7 years, 5 months ago (2013-07-24 12:45:12 UTC) #5
Anders Johnsen
7 years, 5 months ago (2013-07-24 12:46:23 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/19668013/diff/5001/tests/standalone/io/http_r...
File tests/standalone/io/http_response_deadline_test.dart (right):

https://codereview.chromium.org/19668013/diff/5001/tests/standalone/io/http_r...
tests/standalone/io/http_response_deadline_test.dart:47: return new
Future.delayed(const Duration(milliseconds: 500), () {
On 2013/07/24 12:29:51, Søren Gjesse wrote:
> Even though we are in the same VM timing issues could make the two timers fire
> "at the same time". But still the dead line timer will fire first, so it
should
> not be flaky as socket.destroy is sync.

Reworked the timers a bit.

Powered by Google App Engine
This is Rietveld 408576698