| 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?
|
| }
|
|
|