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

Unified Diff: sdk/lib/io/http_impl.dart

Issue 16021016: dart:io | Fix issue involving SecureServerSocket error handling and HttpServer stream cancellation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add tests for cancelOnError on SecureServerSocket. Created 7 years, 6 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 | sdk/lib/io/secure_server_socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 15d7ee84d5800ccbd0dd4ee6ac431ee0c33e0c04..e8f35a3c3c99f79263596ab59f3f1c0b131ddff3 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1842,10 +1842,16 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
});
}
- _HttpServer._(this._serverSocket, this._closeServer);
+ _HttpServer._(this._serverSocket, this._closeServer) {
+ _controller = new StreamController<HttpRequest>(sync: true,
+ onCancel: close);
+ }
_HttpServer.listenOn(ServerSocket this._serverSocket)
- : _closeServer = false;
+ : _closeServer = false {
+ _controller = new StreamController<HttpRequest>(sync: true,
+ onCancel: close);
+ }
StreamSubscription<HttpRequest> listen(void onData(HttpRequest event),
{void onError(error),
@@ -1937,8 +1943,7 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
// Set of currently connected clients.
final Set<_HttpConnection> _connections = new Set<_HttpConnection>();
- final StreamController<HttpRequest> _controller
- = new StreamController<HttpRequest>(sync: true);
+ StreamController<HttpRequest> _controller;
// TODO(ajohnsen): Use close queue?
}
« no previous file with comments | « no previous file | sdk/lib/io/secure_server_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698