Unverified Commit 870da175 authored by Yegor's avatar Yegor Committed by GitHub

remove unused forwardPort; truthier console messages (#12981)

parent c1d742b2
......@@ -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]}');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment