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

You need to sign in or sign up before continuing.
Commit 7ad48925 by Jan Aagaard Meier

Fix for mariadb as well

1 parent 64f3a87a
Showing with 8 additions and 2 deletions
......@@ -90,7 +90,10 @@ module.exports = (function() {
var config = self.config.replication.read[reads++]
connect.call(self, function (err, connection) {
connection.queryType = 'read'
if (connection) {
connection.queryType = 'read'
}
done(null, connection)
}, config)
},
......@@ -106,7 +109,10 @@ module.exports = (function() {
name: 'sequelize-write',
create: function (done) {
connect.call(self, function (err, connection) {
connection.queryType = 'write'
if (connection) {
connection.queryType = 'write'
}
done(null, connection)
}, self.config.replication.write)
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!