Index: utils/tests/pub/test_pub.dart |
diff --git a/utils/tests/pub/test_pub.dart b/utils/tests/pub/test_pub.dart |
index a03b0fec339a74a9988d4eb7589d0d540409ab8c..1e759a0f4df1d06b2fd6281008f1d1e5827cac52 100644 |
--- a/utils/tests/pub/test_pub.dart |
+++ b/utils/tests/pub/test_pub.dart |
@@ -105,7 +105,7 @@ void serve([List<Descriptor> contents]) { |
} catch (e) { |
response.statusCode = 404; |
response.contentLength = 0; |
- response.outputStream.close(); |
+ closeHttpResponse(request, response); |
return; |
} |
@@ -114,14 +114,14 @@ void serve([List<Descriptor> contents]) { |
response.statusCode = 200; |
response.contentLength = data.length; |
response.outputStream.write(data); |
- response.outputStream.close(); |
+ closeHttpResponse(request, response); |
}); |
future.handleException((e) { |
print("Exception while handling ${request.uri}: $e"); |
response.statusCode = 500; |
response.reasonPhrase = e.message; |
- response.outputStream.close(); |
+ closeHttpResponse(request, response); |
}); |
}; |
_server.listen("127.0.0.1", 0); |