Skip to content

Commit

Permalink
Optimize CompletableFuture get (#8223)
Browse files Browse the repository at this point in the history
  • Loading branch information
MentosL authored Jul 8, 2021
1 parent aef74db commit 9ef015b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import static org.apache.dubbo.rpc.Constants.ASYNC_KEY;
import static org.apache.dubbo.rpc.Constants.MERGER_KEY;
Expand Down Expand Up @@ -97,7 +98,7 @@ protected Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, Load
for (Map.Entry<String, Result> entry : results.entrySet()) {
Result asyncResult = entry.getValue();
try {
Result r = asyncResult.get();
Result r = asyncResult.get(Integer.MAX_VALUE, TimeUnit.MILLISECONDS);
if (r.hasException()) {
log.error("Invoke " + getGroupDescFromServiceKey(entry.getKey()) +
" failed: " + r.getException().getMessage(),
Expand Down

0 comments on commit 9ef015b

Please sign in to comment.