forge() should not be awaited

This commit is contained in:
Daniel Lugo 2021-09-23 10:09:44 -04:00
parent 2acb7bc379
commit 06d20f9c16

View file

@ -241,7 +241,8 @@ let procCounter = 0
let killed = false
const forge = async () => {
const forge = () => {
;(async () => {
if (killed) {
throw new Error('Tried to forge after killing GunSmith')
}
@ -337,6 +338,7 @@ const forge = async () => {
// eslint-disable-next-line require-atomic-updates
isForging = false
flushPendingPuts()
})()
}
/**
@ -575,8 +577,7 @@ function createReplica(path, afterMap = false) {
setTimeout(() => {
if (!canaryPeep) {
forge()
.then(isReady)
.then(checkCanary)
isReady().then(checkCanary)
}
}, 30000)