mirror of
https://github.com/knex/knex.git
synced 2026-01-05 19:47:55 +00:00
Must always clear the timeout for handling 'acquireConnectionTimeout', even if an error occurs. Fixes #1973 (#1974)
This commit is contained in:
parent
b722753ea3
commit
10a6505bec
@ -239,10 +239,10 @@ assign(Client.prototype, {
|
||||
))
|
||||
}, this.config.acquireConnectionTimeout || 60000)
|
||||
this.pool.acquire((err, connection) => {
|
||||
clearTimeout(t)
|
||||
if (err) {
|
||||
return rejecter(err)
|
||||
}
|
||||
clearTimeout(t)
|
||||
if (wasRejected) {
|
||||
this.pool.release(connection)
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user