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

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new fb27010eb [ISSUE#4198]Do some code optimization.[GrpcRetryer] (#4205)
fb27010eb is described below

commit fb27010ebbba7fb1a8cd3ed5544a858baca5a7ab
Author: Harshitha Sudhakar 
<[email protected]>
AuthorDate: Mon Jul 10 14:26:04 2023 +0530

    [ISSUE#4198]Do some code optimization.[GrpcRetryer] (#4205)
    
    * Update GrpcRetryer.java
    
    * Update GrpcRetryer.java
    
    Fixed Checkstyle Issues
    
    * Update GrpcRetryer.java
---
 .../eventmesh/runtime/core/protocol/grpc/retry/GrpcRetryer.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/retry/GrpcRetryer.java
 
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/retry/GrpcRetryer.java
index 4c5cea103..6de4eee58 100644
--- 
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/retry/GrpcRetryer.java
+++ 
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/retry/GrpcRetryer.java
@@ -62,7 +62,7 @@ public class GrpcRetryer {
 
         dispatcher = new Thread(() -> {
             try {
-                DelayRetryable retryObj = null;
+                DelayRetryable retryObj;
                 while (!Thread.currentThread().isInterrupted()
                     && (retryObj = failed.take()) != null) {
                     final DelayRetryable delayRetryable = retryObj;
@@ -78,6 +78,9 @@ public class GrpcRetryer {
                     });
                 }
             } catch (Exception e) {
+                if (e instanceof InterruptedException) {
+                    Thread.currentThread().interrupt();
+                }
                 log.error("grpc-retry-dispatcher error!", e);
             }
         }, "grpc-retry-dispatcher");


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to