heartbeat status (#1635)

This commit is contained in:
tiger.yan
2020-01-16 17:51:42 +08:00
committed by GitHub
parent 0ac822c016
commit 8e54f3ffbd
@@ -85,7 +85,6 @@ public class MySQLHeartbeat {
reentrantLock.lock();
try {
isStop.compareAndSet(true, false);
this.status = OK_STATUS;
} finally {
reentrantLock.unlock();
}
@@ -96,6 +95,7 @@ public class MySQLHeartbeat {
reentrantLock.lock();
try {
if (isStop.compareAndSet(false, true)) {
this.status = INIT_STATUS;
if (!isChecking.get()) {
if (detector != null) {
detector.quit();