You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by wu...@apache.org on 2018/09/06 14:33:36 UTC
[incubator-skywalking] 01/01: Shutdown channel and notify when
exception happens.
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch uplink-exception
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git
commit c9e1008be37b95c896c18f723ad6faaeca5752f0
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Sep 6 22:33:29 2018 +0800
Shutdown channel and notify when exception happens.
---
.../org/apache/skywalking/apm/agent/core/remote/GRPCChannelManager.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/GRPCChannelManager.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/GRPCChannelManager.java
index c6f7cc0..617b7f8 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/GRPCChannelManager.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/GRPCChannelManager.java
@@ -138,6 +138,8 @@ public class GRPCChannelManager implements BootService, Runnable {
public void reportError(Throwable throwable) {
if (isNetworkError(throwable)) {
reconnect = true;
+ this.managedChannel.shutdownNow();
+ this.notify(GRPCChannelStatus.DISCONNECT);
}
}