| Index: sdk/lib/io/http_parser.dart
|
| diff --git a/sdk/lib/io/http_parser.dart b/sdk/lib/io/http_parser.dart
|
| index d3a7e76261f10559f3b13cc876af4fa0bd20e188..68fbc324ab643af712ada50b8ab1c53930dd198b 100644
|
| --- a/sdk/lib/io/http_parser.dart
|
| +++ b/sdk/lib/io/http_parser.dart
|
| @@ -874,7 +874,7 @@ class _HttpParser
|
| assert(_incoming == null);
|
| assert(_bodyController == null);
|
| _bodyController = new StreamController<List<int>>(
|
| - onSubscriptionStateChange: _updateParsePauseState,
|
| + onSubscriptionStateChange: _bodySubscriptionStateChange,
|
| onPauseStateChange: _updateParsePauseState);
|
| _incoming = new _HttpIncoming(
|
| _headers, transferLength, _bodyController.stream);
|
| @@ -902,6 +902,14 @@ class _HttpParser
|
| _paused = true;
|
| }
|
|
|
| + void _bodySubscriptionStateChange() {
|
| + if (_incoming != null && !_bodyController.hasSubscribers) {
|
| + _closeIncoming();
|
| + } else {
|
| + _updateParsePauseState();
|
| + }
|
| + }
|
| +
|
| void _updateParsePauseState() {
|
| if (_bodyController != null) {
|
| if (_bodyController.hasSubscribers && !_bodyController.isPaused) {
|
|
|