remove unused forwardPort; truthier console messages (#12981)

This commit is contained in:
Yegor 2017-11-10 16:51:16 -08:00 committed by GitHub
parent c1d742b29f
commit 870da175bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 18 deletions

View file

@ -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();

View file

@ -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();

View file

@ -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]}');
}
}