|
.catch(() => { |
|
return new Promise(resolve => setTimeout(resolve, 100).unref()) |
|
.then(this._generateNewKeys); |
|
}); |
If saving a public key fails, we wait a (short) time, generate a new key, and try again. If saving a public key will consistently fail (due to some sort of misconfiguration) this will spin CPU generating keys and trying to save them.
Would be good to either
node-auth/packages/node_modules/brightspace-auth-keys/src/key-generator.js
Lines 25 to 28 in 0226d21
If saving a public key fails, we wait a (short) time, generate a new key, and try again. If saving a public key will consistently fail (due to some sort of misconfiguration) this will spin CPU generating keys and trying to save them.
Would be good to either