| Index: runtime/bin/vmservice/server.dart
|
| diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart
|
| index 34bf43e534cf0f6a9edf909da42bc378b96f9882..d4aa5aa49a31f2658e5f68267d9b739dee764ae4 100644
|
| --- a/runtime/bin/vmservice/server.dart
|
| +++ b/runtime/bin/vmservice/server.dart
|
| @@ -344,6 +344,13 @@ class Server {
|
| _server = await HttpServer.bind(address, _port);
|
| _server.listen(_requestHandler, cancelOnError: true);
|
| serverPrint('Observatory listening on $serverAddress');
|
| + if (Platform.isFuchsia) {
|
| + // Create a file with the port number.
|
| + String tmp = Directory.systemTemp.path;
|
| + String path = "$tmp/dart.services/${_server.port}";
|
| + serverPrint("Creating $path");
|
| + new File(path)..createSync(recursive: true);
|
| + }
|
| // Server is up and running.
|
| _notifyServerState(serverAddress.toString());
|
| onServerAddressChange('$serverAddress');
|
| @@ -360,6 +367,13 @@ class Server {
|
| if (_server == null) {
|
| return new Future.value(null);
|
| }
|
| + if (Platform.isFuchsia) {
|
| + // Remove the file with the port number.
|
| + String tmp = Directory.systemTemp.path;
|
| + String path = "$tmp/dart.services/${_server.port}";
|
| + serverPrint("Deleting $path");
|
| + new File(path)..deleteSync();
|
| + }
|
| return _server.close(force: force);
|
| }
|
|
|
|
|