Skip to content

Commit

Permalink
Interrupt current thread when InterruptException occur (#10164)
Browse files Browse the repository at this point in the history
* throw InterruptedException in FailoverClusterInvoker

* interrupt current thread when InterruptException occur
  • Loading branch information
happytimor committed Jul 11, 2022
1 parent 3ec1bee commit 787d26d
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -61,6 +61,7 @@ public Result invoke(Invocation invocation) throws RpcException {
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 787d26d

Please sign in to comment.