From e2007fc4f4d5128c572a094a5ac72461bad6d526 Mon Sep 17 00:00:00 2001 From: Ahoo Wang Date: Sun, 7 Apr 2024 13:42:08 +0800 Subject: [PATCH] feat(dashboard): add favicon.ico --- cosky-dashboard/src/favicon.ico | Bin 0 -> 15406 bytes cosky-dashboard/src/index.html | 1 + .../redis/ConsistencyRedisServiceDiscovery.kt | 16 +++++++--------- 3 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 cosky-dashboard/src/favicon.ico diff --git a/cosky-dashboard/src/favicon.ico b/cosky-dashboard/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..26fcd08e24239884a93288f57c22e4fbfb5bc078 GIT binary patch literal 15406 zcmeI2S#Xrc5y#hwt5SY(kp~`=qEb%EkK`q9N%_^UNmgJ;f)jE$wi6u3RO~o0#3s&R z$2pw%zyy~QCk9C%0YVsah{GJ_G+;pD5+HF{AjByo0qXpJ(>v0~YFA!qS6W=oRPE09 z%{SBC)7{h4(>TdPX5RLG5RRtBRNsqUxikGdjqRA@L-Tu>a^@Nx7EG)T;zTKg5vsL%%XL)|Tg7YeU zlTdgUzO{MAG9gsma<8m~DRzdd!yp+-U^fp0@;V zi`pLZId7Y7w)lr;tDo|@);-u1c(C(zeQz*3^!CmCf(F{@&kvp@bqn63ufvsJMxQf! zdo%1Lo?Oq;JUzGl4^ze?19uKCAy%}2jbU)G%Ytb^^*J{@KMc2fu*soMIc4nM@ z_vnXxDz@00lkc?o759aCR;9PfE}XHd^tJHw=dJqwn%2ietDk&lvH0S6tNz9ptvWqN zc&^-}W4UA>+q~}_#zr_pt%L5&uXtYb>?s&;#NStIY*oc`z#0mETa>;_c=rq+Z?=66 zuu(`K2&8AsXt7jN5N-R@lwUZ*?Cb%T5Bg8RZ>|5SKO;YI<2!77)!XnZllY;xTXSQ+=kN< zJN`0dZud4MzJ44$!-MQG+3(oCU;||fS+h0wOU`fjd5Cq*xhi{1@|`o=iLGv1SmW^<&zyVW zd#)P$oAFbFf0?V#$hL+3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r_D9$63M=D?b4m}fkzsLJCoag*Z>T$6U-w1bT6ypeYYB+1_j!ov=RHpkg N$vOQ0`IF6o{{h2c9 + 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 {