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

Commit 059bab9e by Daniel Durante

Fixed up one off connection clients for Sequelize (if client is already defined …

…simply callback rather than connecting again).
1 parent a8ca68f9
Showing with 4 additions and 0 deletions
......@@ -121,10 +121,14 @@ module.exports = (function() {
this.poolIdentifier = this.pg.pools.getOrCreate(this.sequelize.config)
this.poolIdentifier.connect(connectCallback)
} else {
if (!!this.client) {
connectCallback(null, this.client);
} else {
//create one-off client
this.client = new this.pg.Client(uri)
this.client.connect(connectCallback)
}
}
return emitter
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!