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

This commit is contained in:
wusheng 2016-12-01 18:03:55 +08:00
parent 6bf74b5fc1
commit b2c79e6418
3 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,5 @@
package com.a.eye.skywalking.network.listener.client;
import com.a.eye.skywalking.network.grpc.SendResult;
/**
* Created by wusheng on 2016/11/27.
*/

View File

@ -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 {

View File

@ -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());
}