Skip to content

Commit

Permalink
interrupt thread when InterruptedException occur (#10299)
Browse files Browse the repository at this point in the history
Co-authored-by: chenpeng <chenpeng@huiyu.org.cn>
  • Loading branch information
happytimor and chenpeng committed Jul 11, 2022
1 parent 5f35f0d commit 303cd69
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ private void waitForResultIfSync(AsyncRpcResult asyncResult, RpcInvocation invoc
asyncResult.get(Integer.MAX_VALUE, TimeUnit.MILLISECONDS);
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RpcException("Interrupted unexpectedly while waiting for remote result to return! method: " +
invocation.getMethodName() + ", provider: " + getUrl() + ", cause: " + e.getMessage(), e);
} catch (ExecutionException e) {
Expand Down

0 comments on commit 303cd69

Please sign in to comment.