Navigation Menu

Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 20, 2015
1 parent f1849c5 commit 1daed6b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/droonga-protocol/connection-pool.js
Expand Up @@ -132,12 +132,11 @@ ConnectionPool.prototype = {
this._logger.info('Not watching: getting engine names from predetected member.');
retryCount = retryCount || 0;
var hostName = this._hostNames[retryCount];
if (!hostName)
return Q.Promise((function(resolve, reject, notify) {
var error = new Error('all cluster members are unaccessible.');
this._logger.error(error);
reject(error);
}).bind(this));
if (!hostName) {
var error = new Error('all cluster members are unaccessible.');
this._logger.error(error);
return Q.Promise.reject(error);
}

return this.getEnginesFromClusterMember(hostName)
.then(function(engines) {
Expand Down

0 comments on commit 1daed6b

Please sign in to comment.