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

Issue 9589001: Handle closing of HTTP client and server (Closed)

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

Description

Handle closing of HTTP client and server For the server keep track of the state of the connection and close the socket when it is closed by the client. The client might close the connection both when processing a request and while the connection is an idle keep alive connection. For the client keep track of the active connections as well as the idle keep alive connections. When the client is closed make sure to close all connections. R=ajohnsen@google.com BUG=none TEST=tests/standalone/src/io/HttpShutdownTest.dart Committed: https://code.google.com/p/dart/source/detail?r=4932

Patch Set 1 #

Total comments: 7

Patch Set 2 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -24 lines) Patch
M runtime/bin/http_impl.dart View 1 17 chunks +50 lines, -23 lines 0 comments Download
M runtime/bin/socket.dart View 2 chunks +6 lines, -1 line 0 comments Download
M runtime/bin/socket_impl.dart View 3 chunks +8 lines, -0 lines 0 comments Download
A tests/standalone/src/io/HttpShutdownTest.dart View 1 1 chunk +100 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Søren Gjesse
8 years, 9 months ago (2012-03-02 13:37:55 UTC) #1
Anders Johnsen
LGTM, thank you! :) https://chromiumcodereview.appspot.com/9589001/diff/1/runtime/bin/http_impl.dart File runtime/bin/http_impl.dart (right): https://chromiumcodereview.appspot.com/9589001/diff/1/runtime/bin/http_impl.dart#newcode962 runtime/bin/http_impl.dart:962: void _onClosed() { This is ...
8 years, 9 months ago (2012-03-02 13:48:10 UTC) #2
Anders Johnsen
Just applied it locally, and it fixes all my issues. Thank you!
8 years, 9 months ago (2012-03-03 10:10:21 UTC) #3
Søren Gjesse
8 years, 9 months ago (2012-03-05 07:03:41 UTC) #4
http://codereview.chromium.org/9589001/diff/1/runtime/bin/http_impl.dart
File runtime/bin/http_impl.dart (right):

http://codereview.chromium.org/9589001/diff/1/runtime/bin/http_impl.dart#newc...
runtime/bin/http_impl.dart:1089: // TODO(ajohnsen): Use Set once Socket is
Hashable.
On 2012/03/02 13:48:10, ajohnsen wrote:
> Now that Socket is hashable, could you use a Set here?

Done.

http://codereview.chromium.org/9589001/diff/1/tests/standalone/src/io/HttpShu...
File tests/standalone/src/io/HttpShutdownTest.dart (right):

http://codereview.chromium.org/9589001/diff/1/tests/standalone/src/io/HttpShu...
tests/standalone/src/io/HttpShutdownTest.dart:56: client.shutdown();
On 2012/03/02 13:48:10, ajohnsen wrote:
> With no keepAlive, maybe remove this line?

I think it is a bug in the test setting keep alive to false. Changed that to
true and kept the shutdown.

http://codereview.chromium.org/9589001/diff/1/tests/standalone/src/io/HttpShu...
tests/standalone/src/io/HttpShutdownTest.dart:80: request.keepAlive = false;
On 2012/03/02 13:48:10, ajohnsen wrote:
> Ditto.

Ditto.

Powered by Google App Engine
This is Rietveld 408576698