Chromium Code Reviews| Index: runtime/bin/vmservice/server.dart |
| diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart |
| index 34bf43e534cf0f6a9edf909da42bc378b96f9882..4ec4f8ec5d672947f1a6111b33bf2b1dafc39d09 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)..create(recursive: true); |
|
Cutch
2017/03/10 22:03:01
should this be createSync ?
zra
2017/03/10 22:22:48
I think it doesn't matter since the vmservice does
|
| + } |
| // 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)..delete(); |
|
Cutch
2017/03/10 22:03:01
should this be deleteSync?
zra
2017/03/10 22:22:48
ditto
|
| + } |
| return _server.close(force: force); |
| } |