This commit is contained in:
nkorange 2019-07-05 16:33:52 +08:00
parent 29849041ba
commit 4c055f38b9

View File

@ -86,10 +86,10 @@ public class BeatReactor {
@Override
public void run() {
long result = serverProxy.sendBeat(beatInfo);
if (beatInfo.isStopped()) {
return;
}
long result = serverProxy.sendBeat(beatInfo);
long nextTime = result > 0 ? result : beatInfo.getPeriod();
executorService.schedule(new BeatTask(beatInfo), nextTime, TimeUnit.MILLISECONDS);
}