Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public abstract class HeartbeatHandlerBase<T> extends AbstractService {
protected final AppContext appContext;

private ConcurrentMap<T, ReportTime> runningMap;
private volatile boolean stopped;

public HeartbeatHandlerBase(AppContext appContext, int expectedConcurrency, String name) {
super(name);
Expand Down Expand Up @@ -70,7 +69,6 @@ public void serviceStart() {

@Override
public void serviceStop() {
stopped = true;
if (timeOutCheckerThread != null) {
timeOutCheckerThread.interrupt();
}
Expand Down Expand Up @@ -140,7 +138,7 @@ private class PingChecker implements Runnable {

@Override
public void run() {
while (!stopped && !Thread.currentThread().isInterrupted()) {
while (!Thread.currentThread().isInterrupted()) {
Iterator<Map.Entry<T, ReportTime>> iterator =
runningMap.entrySet().iterator();

Expand All @@ -158,7 +156,7 @@ public void run() {
try {
Thread.sleep(timeOutCheckInterval);
} catch (InterruptedException e) {
break;
Thread.currentThread().interrupt();
}
}
}
Expand Down