Navigation Menu

Skip to content

Commit

Permalink
Close old connections when cluster structure is changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 2, 2015
1 parent 37cf58f commit f72ec89
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/droonga-protocol/connection-pool.js
Expand Up @@ -202,6 +202,9 @@ ConnectionPool.prototype = {
var hostNames = engines.map(function(engine) {
return engine.HostName;
});
// Close all existing connections to droonga-engine nodes.
// Otherwise, old droonga-engine processes become zombie.
this.closeAll();
this.hostNames = hostNames;
this._logger.info('List of droonga-engine hosts is successfully initialized from the cluster.');
this._logger.info('cluster id: '+this.clusterId);
Expand Down

0 comments on commit f72ec89

Please sign in to comment.