This is an automated email from the ASF dual-hosted git repository.

crazyhzm pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 303cd6924f interrupt thread when InterruptedException occur (#10299)
303cd6924f is described below

commit 303cd6924f9a615a501989d58b6f3df4f21b242b
Author: ichenpeng <[email protected]>
AuthorDate: Mon Jul 11 15:16:22 2022 +0800

    interrupt thread when InterruptedException occur (#10299)
    
    Co-authored-by: chenpeng <[email protected]>
---
 .../src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java     | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
 
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
index 71247a5523..e1582febf9 100644
--- 
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
+++ 
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
@@ -266,6 +266,7 @@ public abstract class AbstractInvoker<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) {

Reply via email to