mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Follow up to https://github.com/flutter/flutter/pull/23436 (#23876)
This commit is contained in:
parent
cb3dee79c5
commit
9b66fea2ea
@ -141,15 +141,19 @@ class AttachCommand extends FlutterCommand {
|
||||
'Waiting for a connection from Flutter on ${device.name}...',
|
||||
expectSlowOperation: true,
|
||||
);
|
||||
final int localPort = await device.findIsolatePort(module, localPorts);
|
||||
if (localPort == null) {
|
||||
try {
|
||||
final int localPort = await device.findIsolatePort(module, localPorts);
|
||||
if (localPort == null) {
|
||||
throwToolExit('No active Observatory running module \'$module\' on ${device.name}');
|
||||
}
|
||||
observatoryUri = ipv6
|
||||
? Uri.parse('http://[$ipv6Loopback]:$localPort/')
|
||||
: Uri.parse('http://$ipv4Loopback:$localPort/');
|
||||
status.stop();
|
||||
} catch (_) {
|
||||
status.cancel();
|
||||
throwToolExit('No active Observatory running module \'$module\' on ${device.name}');
|
||||
rethrow;
|
||||
}
|
||||
status.stop();
|
||||
observatoryUri = ipv6
|
||||
? Uri.parse('http://[$ipv6Loopback]:$localPort/')
|
||||
: Uri.parse('http://$ipv4Loopback:$localPort/');
|
||||
} else {
|
||||
ProtocolDiscovery observatoryDiscovery;
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user