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

Commit 82d32f01 by Sascha Depold

fixed client passing for native pg implementation

1 parent 2fad2ef5
Showing with 6 additions and 1 deletions
var Query = require("./query")
, Utils = require("../../utils")
......@@ -110,6 +111,8 @@ module.exports = (function() {
emitter.emit('error', err)
break
}
} else {
emitter.emit('error', new Error(err.message))
}
} else if (client) {
var timezoneCallback = function() {
......@@ -139,7 +142,9 @@ module.exports = (function() {
} else {
//create one-off client
this.client = new this.pg.Client(uri)
this.client.connect(connectCallback)
this.client.connect(function(err, client, done) {
connectCallback(err, client || self.client, done)
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!