iOSDeviceManager queryDevicesForever converted to async
Summary: ^ Reviewed By: lawrencelomax Differential Revision: D47912037 fbshipit-source-id: ac7a9650c82219a21577e6bca7e08d075ae5da15
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e9bae419a7
commit
f301de64f3
@@ -184,16 +184,15 @@ export class IOSDeviceManager {
|
||||
}
|
||||
}
|
||||
|
||||
private queryDevicesForever(bridge: IOSBridge) {
|
||||
return this.queryDevices(bridge)
|
||||
.then(() => {
|
||||
private async queryDevicesForever(bridge: IOSBridge) {
|
||||
try {
|
||||
await this.queryDevices(bridge);
|
||||
// It's important to schedule the next check AFTER the current one has completed
|
||||
// to avoid simultaneous queries which can cause multiple user input prompts.
|
||||
setTimeout(() => this.queryDevicesForever(bridge), 3000);
|
||||
})
|
||||
.catch((err) => {
|
||||
} catch (err) {
|
||||
console.warn('Failed to continuously query devices:', err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async checkXcodeVersionMismatch() {
|
||||
|
||||
Reference in New Issue
Block a user