Unverified Commit f3c806c9 authored by shrike69's avatar shrike69 Committed by GitHub

Remove _checkPort() when getting flutter views (#15184)

parent 7d0536b8
......@@ -162,24 +162,9 @@ class FuchsiaReloadCommand extends FlutterCommand {
return _vmServiceCache[port];
}
Future<bool> _checkPort(int port) async {
bool connected = true;
Socket s;
try {
s = await Socket.connect(ipv4Loopback, port);
} catch (_) {
connected = false;
}
if (s != null)
await s.close();
return connected;
}
Future<List<FlutterView>> _getViews(List<int> ports) async {
final List<FlutterView> views = <FlutterView>[];
for (int port in ports) {
if (!await _checkPort(port))
continue;
final VMService vmService = await _getVMService(port);
await vmService.getVM();
await vmService.waitForViews();
......
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