diff --git a/cosky-dashboard/src/favicon.ico b/cosky-dashboard/src/favicon.ico new file mode 100644 index 00000000..26fcd08e Binary files /dev/null and b/cosky-dashboard/src/favicon.ico differ diff --git a/cosky-dashboard/src/index.html b/cosky-dashboard/src/index.html index 3d553684..ff9295a3 100644 --- a/cosky-dashboard/src/index.html +++ b/cosky-dashboard/src/index.html @@ -7,6 +7,7 @@ content="High-performance, low-cost microservice governance platform. Service Discovery and Configuration Service."> + diff --git a/cosky-discovery/src/main/kotlin/me/ahoo/cosky/discovery/redis/ConsistencyRedisServiceDiscovery.kt b/cosky-discovery/src/main/kotlin/me/ahoo/cosky/discovery/redis/ConsistencyRedisServiceDiscovery.kt index 0169b512..0a149dd9 100644 --- a/cosky-discovery/src/main/kotlin/me/ahoo/cosky/discovery/redis/ConsistencyRedisServiceDiscovery.kt +++ b/cosky-discovery/src/main/kotlin/me/ahoo/cosky/discovery/redis/ConsistencyRedisServiceDiscovery.kt @@ -117,15 +117,13 @@ class ConsistencyRedisServiceDiscovery( require(instanceId.isNotBlank()) { "instanceId must not be blank!" } val namespacedServiceId = NamespacedServiceId(namespace, serviceId) val instancesMono = serviceMapInstances[namespacedServiceId] - return if (instancesMono == null) { - delegate.getInstance(namespace, serviceId, instanceId) - } else { - instancesMono - .flatMapIterable(Function.identity()) - .switchIfEmpty(delegate.getInstance(namespace, serviceId, instanceId)) - .filter { it.instanceId == instanceId } - .next() - } + ?: return delegate.getInstance(namespace, serviceId, instanceId) + + return instancesMono + .flatMapIterable(Function.identity()) + .switchIfEmpty(delegate.getInstance(namespace, serviceId, instanceId)) + .filter { it.instanceId == instanceId } + .next() } override fun getInstance(namespace: String, serviceId: String, instanceId: String): Mono {