1. reset network flag when onError occurs. 2. remove unless import
This commit is contained in:
parent
6bf74b5fc1
commit
b2c79e6418
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue