[flutter_tools] Report iOS mDNS lookup failures to analytics (#41384)

This commit is contained in:
Zachary Anderson 2019-09-26 13:41:11 -07:00 committed by GitHub
parent 0980fa2ddd
commit bb7e3f6045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,13 +373,15 @@ class IOSDevice extends Device {
debuggingOptions.observatoryPort, debuggingOptions.observatoryPort,
); );
if (localUri != null) { if (localUri != null) {
UsageEvent('ios-mdns', 'success').send();
return LaunchResult.succeeded(observatoryUri: localUri); return LaunchResult.succeeded(observatoryUri: localUri);
} }
} catch (error) { } catch (error) {
printError('Failed to establish a debug connection with $id: $error'); printError('Failed to establish a debug connection with $id: $error');
} }
// Fallback to manual protocol discovery // Fallback to manual protocol discovery.
UsageEvent('ios-mdns', 'failure').send();
printTrace('mDNS lookup failed, attempting fallback to reading device log.'); printTrace('mDNS lookup failed, attempting fallback to reading device log.');
try { try {
printTrace('Waiting for observatory port.'); printTrace('Waiting for observatory port.');