This is an automated email from the ASF dual-hosted git repository.
szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 85e5e20fd RATIS-1854. Remove useless error logs when closing the
ratisclient writing thread (#890)
85e5e20fd is described below
commit 85e5e20fd9b4d9aba0b330397385ba89b88d23e0
Author: Potato <[email protected]>
AuthorDate: Tue Jul 4 19:39:08 2023 +0800
RATIS-1854. Remove useless error logs when closing the ratisclient writing
thread (#890)
---
ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcUtil.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcUtil.java
b/ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcUtil.java
index 23e8a8261..8997c6dec 100644
--- a/ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcUtil.java
+++ b/ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcUtil.java
@@ -222,6 +222,8 @@ public interface GrpcUtil {
if (!managedChannel.awaitTermination(3, TimeUnit.SECONDS)) {
LOG.warn("Timed out gracefully shutting down connection: {}. ",
managedChannel);
}
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
} catch (Exception e) {
LOG.error("Unexpected exception while waiting for channel
termination", e);
}
@@ -234,6 +236,8 @@ public interface GrpcUtil {
if (!managedChannel.awaitTermination(2, TimeUnit.SECONDS)) {
LOG.warn("Timed out forcefully shutting down connection: {}. ",
managedChannel);
}
+ }catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
} catch (Exception e) {
LOG.error("Unexpected exception while waiting for channel
termination", e);
}