From 870da175bca3e2fb87b5ca5baa91a45657e44409 Mon Sep 17 00:00:00 2001 From: Yegor Date: Fri, 10 Nov 2017 16:51:16 -0800 Subject: [PATCH] remove unused forwardPort; truthier console messages (#12981) --- packages/flutter_tools/lib/src/device.dart | 16 ---------------- packages/flutter_tools/lib/src/ios/devices.dart | 2 +- .../flutter_tools/lib/src/resident_runner.dart | 3 ++- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index 0d62b400c7f..dc85b43731b 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -206,22 +206,6 @@ abstract class Device { /// Get the port forwarder for this device. DevicePortForwarder get portForwarder; - Future 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(); diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 0704749161a..8dc8e180341 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -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(); diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index 6e6a8679fe4..2e557d242f9 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -58,9 +58,10 @@ class FlutterDevice { return; vmServices = new List(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]}'); } }