[ VM / Service ] Fix service/developer_server_control_test which was broken after vmservice NNBD migration

Change-Id: Ibbf295b25fbad6cbd9bd0db98ecd6c3ac3eb2eeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134791
Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
Ben Konyi 2020-02-07 00:45:09 +00:00
parent af7b5fa4c6
commit e9e555f4e3
2 changed files with 3 additions and 3 deletions

View file

@ -184,7 +184,7 @@ Future<List<Map<String, dynamic>>> listFilesCallback(Uri dirPath) async {
Uri? serverInformationCallback() => _lazyServerBoot().serverAddress;
Future<Uri> webServerControlCallback(bool enable) async {
Future<Uri?> webServerControlCallback(bool enable) async {
final _server = _lazyServerBoot();
if (_server.running != enable) {
if (enable) {
@ -193,7 +193,7 @@ Future<Uri> webServerControlCallback(bool enable) async {
await _server.shutdown(true);
}
}
return _server.serverAddress!;
return _server.serverAddress;
}
void _clearFuture(_) {

View file

@ -166,7 +166,7 @@ typedef Future<Uri> ServerInformamessage_routertionCallback();
typedef Uri? ServerInformationCallback();
/// Called when we want to [enable] or disable the web server.
typedef Future<Uri> WebServerControlCallback(bool enable);
typedef Future<Uri?> WebServerControlCallback(bool enable);
/// Hooks that are setup by the embedder.
class VMServiceEmbedderHooks {