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
|
||||
|
||||
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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue