mirror of
https://github.com/flutter/flutter
synced 2024-10-14 04:02:56 +00:00
remove unused forwardPort; truthier console messages (#12981)
This commit is contained in:
parent
c1d742b29f
commit
870da175bc
|
@ -206,22 +206,6 @@ abstract class Device {
|
|||
/// Get the port forwarder for this device.
|
||||
DevicePortForwarder get portForwarder;
|
||||
|
||||
Future<int> forwardPort(int devicePort, {int hostPort}) async {
|
||||
try {
|
||||
hostPort = await portForwarder
|
||||
.forward(devicePort, hostPort: hostPort)
|
||||
.timeout(const Duration(seconds: 60), onTimeout: () {
|
||||
throw new ToolExit(
|
||||
'Timeout while atempting to foward device port $devicePort');
|
||||
});
|
||||
printTrace('Forwarded host port $hostPort to device port $devicePort');
|
||||
return hostPort;
|
||||
} catch (e) {
|
||||
throw new ToolExit(
|
||||
'Unable to forward host port $hostPort to device port $devicePort: $e');
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear the device's logs.
|
||||
void clearLogs();
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ class IOSDevice extends Device {
|
|||
return null;
|
||||
}
|
||||
|
||||
printTrace('Application launched on the device. Attempting to forward ports.');
|
||||
printTrace('Application launched on the device. Waiting for observatory port.');
|
||||
return await forwardObservatoryUri;
|
||||
}).whenComplete(() {
|
||||
observatoryDiscovery.cancel();
|
||||
|
|
|
@ -58,9 +58,10 @@ class FlutterDevice {
|
|||
return;
|
||||
vmServices = new List<VMService>(observatoryUris.length);
|
||||
for (int i = 0; i < observatoryUris.length; i++) {
|
||||
printTrace('Connecting to service protocol: ${observatoryUris[i]}');
|
||||
vmServices[i] = await VMService.connect(observatoryUris[i],
|
||||
reloadSources: reloadSources);
|
||||
printTrace('Connected to service protocol: ${observatoryUris[i]}');
|
||||
printTrace('Successfully connected to service protocol: ${observatoryUris[i]}');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue