Navigation Menu

Skip to content

Commit

Permalink
Don't create new connection while updating
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 20, 2015
1 parent 797e6b6 commit 7f29afd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/adapter/http.js
Expand Up @@ -50,6 +50,14 @@ function createRequestResponseHandler(params) {
return;
}
var connection = connectionPool.get();
if (!connection) {
// When the cluster members are changing, we cannot get
// actual connection for a member, so retry later.
setTimeout(function() {
processRequest();
}, CONNECTION_RETRY_INTERVAL);
return;
}
var wrappedConnection = new wrapper.DroongaProtocolConnectionWrapper(connection, callback, options);
if (definition.onRequest) {
try {
Expand Down

0 comments on commit 7f29afd

Please sign in to comment.