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

Commit 722de15c by Zolmeister

fixed write pooling release. This makes writes work for master/slave MySQL setups

1 parent 96e79ab5
Showing with 3 additions and 3 deletions
...@@ -108,7 +108,7 @@ module.exports = (function() { ...@@ -108,7 +108,7 @@ module.exports = (function() {
create: function (done) { create: function (done) {
connect.call(self, function (err, connection) { connect.call(self, function (err, connection) {
if (connection) { if (connection) {
connection.queryType = 'read' connection.queryType = 'write'
} }
done(err, connection) done(err, connection)
...@@ -153,7 +153,7 @@ module.exports = (function() { ...@@ -153,7 +153,7 @@ module.exports = (function() {
return return
}.bind(this); }.bind(this);
process.on('exit', this.onProcessExit) process.on('exit', this.onProcessExit)
} }
...@@ -185,7 +185,7 @@ module.exports = (function() { ...@@ -185,7 +185,7 @@ module.exports = (function() {
setTimeout(function() { setTimeout(function() {
if (self.pendingQueries === 0){ if (self.pendingQueries === 0){
self.disconnect.call(self); self.disconnect.call(self);
} }
}, 100); }, 100);
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!