Skip to content

Commit

Permalink
fix(engine-core): allow library engine to reestablish connection afte…
Browse files Browse the repository at this point in the history
…r initial error (#12066)
  • Loading branch information
chronotc committed Mar 30, 2022
1 parent 3d36ce9 commit 708091f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/engine-core/src/library/LibraryEngine.ts
Expand Up @@ -335,7 +335,6 @@ You may have to run ${chalk.greenBright('prisma generate')} for your changes to
?.connect({ enableRawQueries: true })
.then(() => {
this.libraryStarted = true
this.libraryStartingPromise = undefined
debug('library started')
resolve()
})
Expand All @@ -349,6 +348,9 @@ You may have to run ${chalk.greenBright('prisma generate')} for your changes to
reject(new PrismaClientInitializationError(error.message, this.config.clientVersion!, error.error_code))
}
})
.finally(() => {
this.libraryStartingPromise = undefined
})
})
return this.libraryStartingPromise
}
Expand Down

0 comments on commit 708091f

Please sign in to comment.