Fix cert generation for new users

Summary:
Changelog: Fix server certificates not being generated for first time users.

As reported in https://fb.workplace.com/groups/flippersupport/permalink/1247554795725176/, server certificates are not generated properly for new users.

Also the fix. Omg. How does typechecking not find this?

...Oh yeah yeah I now, `await not-a-promise` is juuuusst fine. Long live `.then(` I guess...

Reviewed By: jknoxville

Differential Revision: D32203132

fbshipit-source-id: abd75c178e9c8640a266b2012b9250503d4258be
This commit is contained in:
Michel Weststrate
2021-11-05 05:07:29 -07:00
committed by Facebook GitHub Bot
parent 1e146d68c3
commit 4cf1920e36

View File

@@ -586,7 +586,7 @@ export default class CertificateProvider {
}
async loadSecureServerConfig(): Promise<SecureServerConfig> {
await this.certificateSetup;
await this.certificateSetup();
return {
key: await fs.readFile(serverKey),
cert: await fs.readFile(serverCert),