You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2023/07/10 08:56:11 UTC
[eventmesh] branch master updated: [ISSUE#4198]Do some code optimization.[GrpcRetryer] (#4205)
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 <11...@users.noreply.github.com>
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: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org