提交 b2c79e64 编写于 作者: wu-sheng's avatar wu-sheng

1. reset network flag when onError occurs. 2. remove unless import

上级 6bf74b5f
package com.a.eye.skywalking.network.listener.client;
import com.a.eye.skywalking.network.grpc.SendResult;
/**
* Created by wusheng on 2016/11/27.
*/
......
......@@ -91,7 +91,11 @@ public class Agent2RoutingClient extends Thread {
spanStorageClient.sendACKSpan(ackData);
while (!listener.isBatchFinished()) {
LockSupport.parkNanos(1);
try {
Thread.sleep(10L);
} catch (InterruptedException e) {
}
}
} else {
try {
......
......@@ -34,6 +34,7 @@ public abstract class AbstractRouteSpanEventHandler<T> implements EventHandler<T
SpanStorageClient spanStorageClient = client.newSpanStorageClient(new StorageClientListener() {
@Override
public void onError(Throwable throwable) {
previousSendFinish = true;
HealthCollector.getCurrentHeathReading(getExtraId()).updateData(HeathReading.ERROR, "Failed to send span. error message :" + throwable.getMessage());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册