Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2119)

Unified Diff: pkg/http/test/utils.dart

Issue 14052008: Only stop HTTP server if it was actually started. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/utils.dart
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart
index ab3f5f6dfdebeb1e67fb23d7bdbea7807c920d66..a68bdbb3ad95e12b83a3e28e19ad259dcd929a44 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -108,8 +108,10 @@ Future startServer() {
/// Stops the current HTTP server.
void stopServer() {
- _server.close();
- _server = null;
+ if (_server != null) {
+ _server.close();
+ _server = null;
+ }
}
/// Removes eight spaces of leading indentation from a multiline string.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698