We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bd8507 commit 708fa4fCopy full SHA for 708fa4f
lib/index.js
@@ -319,10 +319,10 @@ function Postgres(url, options) {
319
let destroy
320
321
if (timeout === 0)
322
- return ended = Promise.all(all.map(c => c.destroy()))
+ return ended = Promise.all(all.map(c => c.destroy())).then(() => undefined)
323
324
return ended = Promise.race([
325
- all.map(c => c.end())
+ Promise.all(all.map(c => c.end()))
326
].concat(
327
timeout > 0
328
? new Promise(r => destroy = setTimeout(() => (all.map(c => c.destroy()), r()), timeout * 1000))
0 commit comments