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

Commit a4ce1da7 by Mark Kornfilt

cleanup client after disconnect

1 parent 63d8a0db
Showing with 2 additions and 2 deletions
...@@ -39,6 +39,7 @@ ConnectorManager.prototype.query = function(sql, callee, options) { ...@@ -39,6 +39,7 @@ ConnectorManager.prototype.query = function(sql, callee, options) {
ConnectorManager.prototype.disconnect = function() { ConnectorManager.prototype.disconnect = function() {
this.client.end(function() {}) this.client.end(function() {})
this.client = null
} }
ConnectorManager.prototype.reconnect = function() { ConnectorManager.prototype.reconnect = function() {
...@@ -105,4 +106,4 @@ ConnectorManager.prototype._disconnectIfNoConnections = function() { ...@@ -105,4 +106,4 @@ ConnectorManager.prototype._disconnectIfNoConnections = function() {
this.disconnectTimeoutId = setTimeout(function() { this.disconnectTimeoutId = setTimeout(function() {
self.isConnected && self.hasNoConnections && self.disconnect() self.isConnected && self.hasNoConnections && self.disconnect()
}, 100) }, 100)
} }
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!