Do not block for device manager to become ready

Summary:
^

Also, if an error happens, do not swallow it, rethrow.

Reviewed By: passy

Differential Revision: D49912780

fbshipit-source-id: 30451110d8c5776e2b0826d6e924ab5fe98cd7e2
This commit is contained in:
Lorenzo Blasa
2023-10-05 04:37:16 -07:00
committed by Facebook GitHub Bot
parent 80fc8eb4ed
commit 0e90873096

View File

@@ -199,13 +199,17 @@ export class FlipperServerImpl implements FlipperServer {
await this.createFolders();
await this.server.init();
await this.pluginManager.start();
await this.startDeviceListeners();
this.startDeviceListeners();
this.setServerState('started');
} catch (e) {
if (!isHandledStartupError(e)) {
console.error('Failed to start FlipperServer', e);
}
this.setServerState('error', e);
throw e;
}
}