@Override
    public Mono<Void> stop(long timeoutMillis) {
        localNodeStatusManager.setClosing(true);
        return Mono.whenDelayError(ThreadUtil.shutdown(scheduler, timeoutMillis), Mono.defer(() -> {
            if (localNodeStatusManager.isLocalNodeRegistered()) {
                return localNodeStatusManager.unregisterLocalNodeMembershipAndLeadership()
                        .onErrorMap(t -> new RuntimeException(
                                "Caught an error while unregistering the membership of the local node",
                                t));
            }
            return Mono.empty();
        }));
    }
@return null if the local node isn't active
turms-server-common/src/main/java/im/turms/server/common/infra/cluster/service/discovery/DiscoveryService.java