private void stopCanalInstanceIfNecessary(ClientIdentity clientIdentity) { List<ClientIdentity> clientIdentitys = embededServer.listAllSubscribe(clientIdentity.getDestination()); if (clientIdentitys != null && clientIdentitys.size() == 1 && clientIdentitys.contains(clientIdentity)) { ServerRunningMonitor runningMonitor = ServerRunningMonitors.getRunningMonitor(clientIdentity.getDestination()); if (runningMonitor.isStart()) { runningMonitor.stop(); } } }