| Index: runtime/bin/http_impl.dart
|
| diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
|
| index 8c41b8b4576b2aaae171bb81079cc154e3486591..d00db4f426080e0d21f19d9bd35747b45b419674 100644
|
| --- a/runtime/bin/http_impl.dart
|
| +++ b/runtime/bin/http_impl.dart
|
| @@ -481,13 +481,13 @@ class _HttpConnectionBase implements Hashable {
|
| }
|
|
|
| bool _write(List<int> data, [bool copyBuffer = false]) {
|
| - if (!_error) {
|
| + if (!_error && !_closing) {
|
| return _socket.outputStream.write(data, copyBuffer);
|
| }
|
| }
|
|
|
| bool _writeFrom(List<int> buffer, [int offset, int len]) {
|
| - if (!_error) {
|
| + if (!_error && !_closing) {
|
| return _socket.outputStream.writeFrom(buffer, offset, len);
|
| }
|
| }
|
| @@ -514,6 +514,7 @@ class _HttpConnectionBase implements Hashable {
|
| }
|
|
|
| void _onClosed() {
|
| + _closing = true;
|
| _onConnectionClosed(null);
|
| }
|
|
|
| @@ -589,7 +590,6 @@ class _HttpConnection extends _HttpConnectionBase {
|
| if (e == null) {
|
| // Indicate connection close to the HTTP parser.
|
| _httpParser.connectionClosed();
|
| - _closing = true;
|
| }
|
| }
|
|
|
|
|