private void recovery()

in dubbo-remoting-extensions/dubbo-remoting-etcd3/src/main/java/org/apache/dubbo/remoting/etcd/jetcd/JEtcdClientWrapper.java [423:467]


    private void recovery() {

        try {
            /**
             * The client is processing reconnection
             */
            if (cancelKeepAlive) {
                return;
            }

            cancelKeepAlive();

            Set<String> ephemeralPaths = new HashSet<String>(registeredPaths);
            if (!ephemeralPaths.isEmpty()) {
                for (String path : ephemeralPaths) {
                    try {

                        /**
                         * The client is processing reconnection,
                         * cancel remaining service registration
                         */
                        if (cancelKeepAlive) {
                            return;
                        }

                        createEphemeral(path);
                        failedRegistered.remove(path);
                    } catch (Exception e) {

                        /**
                         * waiting for retry again
                         */
                        failedRegistered.add(path);

                        Status status = Status.fromThrowable(e);
                        if (status.getCode() == Status.Code.NOT_FOUND) {
                            cancelKeepAlive();
                        }
                    }
                }
            }
        } catch (Throwable t) {
            logger.warn("Unexpected error, failed to recover from global lease expired or deadline exceeded.", t);
        }
    }