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

Unified Diff: runtime/bin/http_impl.dart

Issue 10356069: Correctly entirely close client connections, when closing http server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index 60b39ec83102c499e56bedbaf48cfb22be889cbf..33928c728e31dcde2e79150b31e1952592769c30 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -970,6 +970,7 @@ class _HttpServer implements HttpServer {
// Accept the client connection.
_HttpConnection connection = new _HttpConnection(this);
connection._connectionEstablished(socket);
+ _connections.add(connection);
connection.onRequestReceived = _handleRequest;
connection.onClosed = () => _connections.remove(connection);
connection.onDetach = () => _connections.remove(connection);
@@ -981,8 +982,6 @@ class _HttpServer implements HttpServer {
throw(e);
}
};
- connection._connectionEstablished(socket);
- _connections.add(connection);
}
serverSocket.onConnection = onConnection;
_server = serverSocket;
@@ -1005,7 +1004,7 @@ class _HttpServer implements HttpServer {
}
_server = null;
for (_HttpConnection connection in _connections) {
- connection._close();
+ connection._destroy();
}
_connections.clear();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698