Fix write to sink after close in test code.

R=floitsch@google.com

Review-Url: https://codereview.chromium.org//2857383002 .
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18a42ce..c033678 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.0.1
+
+- Fix test to not write to sink after it's closed.
+
 ## 1.0.0
 
 - Public API marked stable.
diff --git a/pubspec.yaml b/pubspec.yaml
index e1afec2..eaef83e 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: package_config
-version: 1.0.0 
+version: 1.0.1
 description: Support for working with Package Resolution config files.
 author: Dart Team <misc@dartlang.org>
 homepage: https://github.com/dart-lang/package_config
diff --git a/test/discovery_test.dart b/test/discovery_test.dart
index 8807ac4..897063f 100644
--- a/test/discovery_test.dart
+++ b/test/discovery_test.dart
@@ -290,6 +290,7 @@
             if (fileOrDir == null) {
               request.response.statusCode = 404;
               request.response.close();
+              return;
             }
           }
           request.response.write(fileOrDir);