forge() should not be awaited
This commit is contained in:
parent
2acb7bc379
commit
06d20f9c16
1 changed files with 79 additions and 78 deletions
|
|
@ -241,7 +241,8 @@ let procCounter = 0
|
||||||
|
|
||||||
let killed = false
|
let killed = false
|
||||||
|
|
||||||
const forge = async () => {
|
const forge = () => {
|
||||||
|
;(async () => {
|
||||||
if (killed) {
|
if (killed) {
|
||||||
throw new Error('Tried to forge after killing GunSmith')
|
throw new Error('Tried to forge after killing GunSmith')
|
||||||
}
|
}
|
||||||
|
|
@ -337,6 +338,7 @@ const forge = async () => {
|
||||||
// eslint-disable-next-line require-atomic-updates
|
// eslint-disable-next-line require-atomic-updates
|
||||||
isForging = false
|
isForging = false
|
||||||
flushPendingPuts()
|
flushPendingPuts()
|
||||||
|
})()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -575,8 +577,7 @@ function createReplica(path, afterMap = false) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!canaryPeep) {
|
if (!canaryPeep) {
|
||||||
forge()
|
forge()
|
||||||
.then(isReady)
|
isReady().then(checkCanary)
|
||||||
.then(checkCanary)
|
|
||||||
}
|
}
|
||||||
}, 30000)
|
}, 30000)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue