Index: sdk/lib/io/http_impl.dart |
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart |
index 2f852dce0b03de416ba3afb2524521945a7d0353..249bd2e65381c611161c84a3cc636cf68b29601a 100644 |
--- a/sdk/lib/io/http_impl.dart |
+++ b/sdk/lib/io/http_impl.dart |
@@ -1343,8 +1343,9 @@ class _HttpClientConnection { |
_nextResponseCompleter.future |
.then((incoming) { |
_currentUri = null; |
- incoming.dataDone.then((_) { |
- if (!_dispose && |
+ incoming.dataDone.then((closing) { |
+ if (!closing && |
+ !_dispose && |
incoming.headers.persistentConnection && |
request.persistentConnection) { |
// Return connection, now we are done. |