Skip to content

Commit

Permalink
fix timeout overriding in ctx.call
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed May 3, 2018
1 parent bb7a657 commit 5040a2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ class Context {
if (distTimeout <= 0) {
return Promise.reject(new RequestSkippedError(actionName, this.broker.nodeID));
}
opts.timeout = distTimeout;

if (!opts.timeout || distTimeout < opts.timeout)
opts.timeout = distTimeout;
}

// Max calling level check to avoid calling loops
Expand Down

0 comments on commit 5040a2e

Please sign in to comment.