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

Commit 442b146e by Sascha Depold

Merge branch 'master' of github.com:sequelize/sequelize

2 parents c22a6191 fbc3189b
Showing with 4 additions and 3 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
}
......@@ -118,7 +119,7 @@ module.exports = (function() {
if (this.pooling) {
// acquire client from pool
this.poolIdentifier = this.pg.pools.getOrCreate(this.sequelize.config)
this.poolIdentifier = this.pg.pools.getOrCreate(uri)
this.poolIdentifier.connect(connectCallback)
} else {
if (!!this.client) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!