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

Issue 11411121: Generate an error for active connections when the HTTP client is shutdown (Closed)

Created:
8 years, 1 month ago by Søren Gjesse
Modified:
8 years, 1 month ago
CC:
reviews_dartlang.org, Bob Nystrom
Visibility:
Public.

Description

Generate an error for active connections when the HTTP client is shutdown Before the underlying sockets where just silently closed causing no more IO events on active connections no matter what state they where in. Also added an optional "force" argument to HttpClient.shutdown. If that is false (the default) The HttpClient will not close active connections until they are done. This causes all pkg/http and pub tests to pass. R=ager@google.com, nweiz@google.com BUG=dart:6594 Committed: https://code.google.com/p/dart/source/detail?r=15275

Patch Set 1 #

Patch Set 2 : All standalone tests running #

Patch Set 3 : Minor status file change #

Patch Set 4 : Added argument force to shutdwn #

Patch Set 5 : Fixed long line #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -106 lines) Patch
M pkg/http/test/request_test.dart View 1 2 chunks +0 lines, -8 lines 0 comments Download
M pkg/pkg.status View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M sdk/lib/io/http.dart View 1 2 3 1 chunk +5 lines, -2 lines 3 comments Download
M sdk/lib/io/http_impl.dart View 1 2 3 9 chunks +30 lines, -23 lines 0 comments Download
M sdk/lib/io/http_parser.dart View 1 2 3 4 chunks +5 lines, -3 lines 0 comments Download
M tests/standalone/io/http_advanced_test.dart View 1 5 chunks +37 lines, -22 lines 0 comments Download
M tests/standalone/io/http_auth_test.dart View 1 4 chunks +11 lines, -5 lines 0 comments Download
M tests/standalone/io/http_connection_close_test.dart View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M tests/standalone/io/http_connection_header_test.dart View 1 1 chunk +7 lines, -5 lines 0 comments Download
M tests/standalone/io/http_content_length_test.dart View 1 2 chunks +14 lines, -8 lines 0 comments Download
M tests/standalone/io/http_redirect_test.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/http_server_early_client_close_test.dart View 1 2 3 4 1 chunk +7 lines, -6 lines 0 comments Download
M tests/standalone/io/http_server_handler_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/http_session_test.dart View 1 1 chunk +5 lines, -2 lines 0 comments Download
M tests/standalone/io/http_shutdown_test.dart View 1 2 3 5 chunks +26 lines, -16 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Søren Gjesse
As the message says this causes some pkg/http and pub tests to fail due to ...
8 years, 1 month ago (2012-11-21 13:34:52 UTC) #1
Mads Ager (google)
LGTM This also explains why pub hangs sometimes.
8 years, 1 month ago (2012-11-21 13:49:01 UTC) #2
nweiz
On 2012/11/21 13:34:52, Søren Gjesse wrote: > As the message says this causes some pkg/http ...
8 years, 1 month ago (2012-11-21 20:32:44 UTC) #3
Mads Ager (google)
On 2012/11/21 20:32:44, nweiz wrote: > On 2012/11/21 13:34:52, Søren Gjesse wrote: > > As ...
8 years, 1 month ago (2012-11-22 07:24:22 UTC) #4
Søren Gjesse
PTAL Added "force" flag to HttpClient.shutdown. See updated CL description. This should fix pkg/http and ...
8 years, 1 month ago (2012-11-22 15:05:14 UTC) #5
Mads Ager (google)
LGTM This is probably the right thing to do so that people can close the ...
8 years, 1 month ago (2012-11-23 07:25:38 UTC) #6
Søren Gjesse
https://codereview.chromium.org/11411121/diff/10002/sdk/lib/io/http.dart File sdk/lib/io/http.dart (right): https://codereview.chromium.org/11411121/diff/10002/sdk/lib/io/http.dart#newcode835 sdk/lib/io/http.dart:835: * resources. If [force] is [:false:] the [:HttpClient:] will ...
8 years, 1 month ago (2012-11-23 09:08:47 UTC) #7
Søren Gjesse
8 years, 1 month ago (2012-11-23 09:31:16 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/11411121/diff/10002/sdk/lib/io/http.dart
File sdk/lib/io/http.dart (right):

https://codereview.chromium.org/11411121/diff/10002/sdk/lib/io/http.dart#newc...
sdk/lib/io/http.dart:835: * resources. If [force] is [:false:] the
[:HttpClient:] will be
On 2012/11/23 09:08:47, Søren Gjesse wrote:
> On 2012/11/23 07:25:38, Mads Ager wrote:
> > Could we add a comment to make it explicit what happens with connections
that
> > are not done when you force a client shutdown?
> 
> It's already there, "If [force] is [:true:]..." above.

Added more information on forced shutdown.

Powered by Google App Engine
This is Rietveld 408576698