Fix bugs with ext.flutter.activeDevToolsServerAddress (#74423)
This commit is contained in:
@@ -1420,9 +1420,15 @@ abstract class ResidentRunner {
|
||||
} on Exception {
|
||||
// do nothing
|
||||
}
|
||||
vmService.onExtensionEvent.listen((vm_service.Event event) {
|
||||
StreamSubscription<vm_service.Event> extensionStream;
|
||||
extensionStream = vmService.onExtensionEvent.listen((vm_service.Event event) {
|
||||
if (event.json['extensionKind'] == 'Flutter.FrameworkInitialization') {
|
||||
completer.complete();
|
||||
// The 'Flutter.FrameworkInitialization' event is sent on hot restart
|
||||
// as well, so make sure we don't try to complete this twice.
|
||||
if (!completer.isCompleted) {
|
||||
completer.complete();
|
||||
extensionStream.cancel();
|
||||
}
|
||||
}
|
||||
});
|
||||
final vm_service.IsolateRef isolateRef = (await vmService.getVM()).isolates.first;
|
||||
|
||||
@@ -634,6 +634,7 @@ class HotRunner extends ResidentRunner {
|
||||
if (!silent) {
|
||||
globals.printStatus('Restarted application in ${getElapsedAsMilliseconds(timer.elapsed)}.');
|
||||
}
|
||||
unawaited(maybeCallDevToolsUriServiceExtension());
|
||||
return result;
|
||||
}
|
||||
final OperationResult result = await _hotReloadHelper(
|
||||
|
||||
Reference in New Issue
Block a user