Index: tests/standalone/io/http_connection_header_test.dart |
diff --git a/tests/standalone/io/http_connection_header_test.dart b/tests/standalone/io/http_connection_header_test.dart |
index 617854a3e224082c3bbfc0e57bf8a18012bd0594..ead20673abe9b9b1252d20be91ac56ed6de2736d 100644 |
--- a/tests/standalone/io/http_connection_header_test.dart |
+++ b/tests/standalone/io/http_connection_header_test.dart |
@@ -64,11 +64,13 @@ void test(int totalConnections, bool clientPersistentConnection) { |
Expect.isFalse(response.persistentConnection); |
checkExpectedConnectionHeaders(response.headers, |
response.persistentConnection); |
- count++; |
- if (count == totalConnections) { |
- client.shutdown(); |
- server.close(); |
- } |
+ response.inputStream.onClosed = () { |
+ count++; |
+ if (count == totalConnections) { |
+ client.shutdown(); |
+ server.close(); |
+ } |
+ }; |
}; |
} |
} |