You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/07/11 01:46:11 UTC
[dubbo] branch master updated: Interrupt current thread when InterruptException occur (#10164)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 787d26d132 Interrupt current thread when InterruptException occur (#10164)
787d26d132 is described below
commit 787d26d132dd237dec7c34ef23462ebef33b2f0c
Author: ichenpeng <ic...@qq.com>
AuthorDate: Mon Jul 11 09:46:04 2022 +0800
Interrupt current thread when InterruptException occur (#10164)
* throw InterruptedException in FailoverClusterInvoker
* interrupt current thread when InterruptException occur
---
.../src/main/java/org/apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java
index 69a3a28dee..187109a131 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java
@@ -61,6 +61,7 @@ public class AsyncToSyncInvoker<T> implements Invoker<T> {
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) {