Index: runtime/bin/vmservice/server.dart |
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart |
index c6e7ce42c98ffd3941ec0058c24ad21a0b3bc25e..a847828b84a6af53388420013ceac87ce1a47ad0 100644 |
--- a/runtime/bin/vmservice/server.dart |
+++ b/runtime/bin/vmservice/server.dart |
@@ -180,6 +180,13 @@ class Server { |
}); |
} |
+ close(bool force) { |
+ if (_server == null) { |
+ return new Future.value(null); |
+ } |
+ return _server.close(force: force); |
+ } |
+ |
Future shutdown(bool forced) { |
if (_server == null) { |
// Not started. |
@@ -192,7 +199,7 @@ class Server { |
// Shutdown HTTP server and subscription. |
var ip = _server.address.address.toString(); |
var port = _server.port.toString(); |
- return _server.close(force: forced).then((_) { |
+ return close(forced).then((_) { |
if (_displayMessages) { |
print('Observatory no longer listening on http://$ip:$port'); |
} |