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

Commit 3563869b by Mick Hansen

Merge pull request #2355 from chornyi/1.7.0

 Handle disconnects for MySQL read replicas with connection pooling
2 parents 3909a477 64c7536b
Showing with 7 additions and 0 deletions
...@@ -68,6 +68,13 @@ module.exports = (function() { ...@@ -68,6 +68,13 @@ module.exports = (function() {
return this.write.release(client); return this.write.release(client);
} }
}, },
destroy: function (client) {
if (client.queryType == 'read') {
return this.read.destroy(client);
} else {
return this.write.destroy(client);
}
},
acquire: function (callback, priority, queryType) { acquire: function (callback, priority, queryType) {
if (queryType == 'SELECT') { if (queryType == 'SELECT') {
this.read.acquire(callback, priority); this.read.acquire(callback, priority);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!