[Groonga-commit] droonga/express-droonga at 1daed6b [master] Simplify

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Apr 20 12:12:57 JST 2015


YUKI Hiroshi	2015-04-20 12:12:57 +0900 (Mon, 20 Apr 2015)

  New Revision: 1daed6b93817f43fbd030d7cec701b21987d0297
  https://github.com/droonga/express-droonga/commit/1daed6b93817f43fbd030d7cec701b21987d0297

  Message:
    Simplify

  Modified files:
    lib/droonga-protocol/connection-pool.js

  Modified: lib/droonga-protocol/connection-pool.js (+5 -6)
===================================================================
--- lib/droonga-protocol/connection-pool.js    2015-04-20 12:12:32 +0900 (5afbca4)
+++ lib/droonga-protocol/connection-pool.js    2015-04-20 12:12:57 +0900 (e7f1616)
@@ -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) {
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index