@Override
    public void onDisConnect(Connection connection) {
        connected = false;
        LogUtils.NAMING_LOGGER.warn("Grpc connection disconnect, mark to redo");
        synchronized (registeredInstances) {
            registeredInstances.values().forEach(instanceRedoData -> instanceRedoData.setRegistered(false));
        }
        synchronized (subscribes) {
            subscribes.values().forEach(subscriberRedoData -> subscriberRedoData.setRegistered(false));
        }
        LogUtils.NAMING_LOGGER.warn("mark to redo completed");
    }
@Test
    void testOnDisConnect() {
        redoService.onConnected(new TestConnection(new RpcClient.ServerInfo()));
        redoService.cacheInstanceForRedo(SERVICE, GROUP, new Instance());
        redoService.instanceRegistered(SERVICE, GROUP);
        redoService.cacheSubscriberForRedo(SERVICE, GROUP, CLUSTER);
        redoService.subscriberRegistered(SERVICE, GROUP, CLUSTER);
        assertTrue(redoService.isConnected());
        assertTrue(redoService.findInstanceRedoData().isEmpty());
        assertTrue(redoService.findSubscriberRedoData().isEmpty());
        redoService.onDisConnect(new TestConnection(new RpcClient.ServerInfo()));
        assertFalse(redoService.isConnected());
        assertFalse(redoService.findInstanceRedoData().isEmpty());
        assertFalse(redoService.findSubscriberRedoData().isEmpty());
    }