* [ISSUES #8635] fix a NPE when call the shutdown method Close #8635 * [ISSUES #8635] remove init judgment
This commit is contained in:
parent
ccce9da5a6
commit
56ee220a68
@ -469,10 +469,16 @@ public class RaftCore implements Closeable {
|
||||
Loggers.RAFT.warn("start to close old raft protocol!!!");
|
||||
Loggers.RAFT.warn("stop old raft protocol task for notifier");
|
||||
NotifyCenter.deregisterSubscriber(notifier);
|
||||
Loggers.RAFT.warn("stop old raft protocol task for master task");
|
||||
masterTask.cancel(true);
|
||||
Loggers.RAFT.warn("stop old raft protocol task for heartbeat task");
|
||||
heartbeatTask.cancel(true);
|
||||
if (masterTask != null) {
|
||||
Loggers.RAFT.warn("stop old raft protocol task for master task");
|
||||
masterTask.cancel(true);
|
||||
}
|
||||
|
||||
if (heartbeatTask != null) {
|
||||
Loggers.RAFT.warn("stop old raft protocol task for heartbeat task");
|
||||
heartbeatTask.cancel(true);
|
||||
}
|
||||
|
||||
Loggers.RAFT.warn("clean old cache datum for old raft");
|
||||
datums.clear();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user