| Index: tests/standalone/io/http_content_length_test.dart
|
| diff --git a/tests/standalone/io/http_content_length_test.dart b/tests/standalone/io/http_content_length_test.dart
|
| index 47ef94166916fcfcc8ce7d344f40c9c0db054aab..5a082f2a9f191abcac70c2f30c4f57ac230c9568 100644
|
| --- a/tests/standalone/io/http_content_length_test.dart
|
| +++ b/tests/standalone/io/http_content_length_test.dart
|
| @@ -37,10 +37,9 @@ void testNoBody(int totalConnections, bool explicitContentLength) {
|
| conn.onResponse = (HttpClientResponse response) {
|
| Expect.equals("0", response.headers.value('content-length'));
|
| Expect.equals(0, response.contentLength);
|
| - count++;
|
| response.inputStream.onData = response.inputStream.read;
|
| response.inputStream.onClosed = () {
|
| - if (count == totalConnections) {
|
| + if (++count == totalConnections) {
|
| client.shutdown();
|
| server.close();
|
| }
|
| @@ -84,10 +83,9 @@ void testBody(int totalConnections) {
|
| conn.onResponse = (HttpClientResponse response) {
|
| Expect.equals("2", response.headers.value('content-length'));
|
| Expect.equals(2, response.contentLength);
|
| - count++;
|
| response.inputStream.onData = response.inputStream.read;
|
| response.inputStream.onClosed = () {
|
| - if (count == totalConnections) {
|
| + if (++count == totalConnections) {
|
| client.shutdown();
|
| server.close();
|
| }
|
|
|