不要怂,就是干,撸起袖子干!

You need to sign in or sign up before continuing.
Commit b864d06a by Daniel Durante

For non pooling connections in postgres, orhpaned clients should be able to go t…

…hrough now / we now do a more strict check for connections. This is really a band-aid on a problem that needs stitches, I've added comments in the code to explain what we really need...
1 parent 74f3420d
Showing with 3 additions and 2 deletions
......@@ -72,8 +72,9 @@ module.exports = (function() {
var emitter = new (require('events').EventEmitter)()
// in case database is slow to connect, prevent orphaning the client
if (this.isConnecting && !this.pooling) {
emitter.emit('success')
// TODO: We really need some sort of queue/flush/drain mechanism
if (this.isConnecting && !this.pooling && this.client === null) {
emitter.emit('success', null)
return emitter
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!