From 9135d8425d0c374daf2c747d35b8a783f2faa51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8?= Date: Thu, 5 Dec 2024 02:15:31 +0800 Subject: [PATCH] fix: cache not expired after RSocket disposed (#866) --- .../services/transport/rsocket/RSocketClientTransport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java index 36c41472b..a8c9e2f98 100644 --- a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java @@ -70,7 +70,7 @@ public ClientChannel create(ServiceReference serviceReference) { key -> getCredentials(serviceReference) .flatMap(creds -> connect(key, creds, monoMap)) - .cache() + .cacheInvalidateIf(RSocket::isDisposed) .doOnError(ex -> monoMap.remove(key))); return new RSocketClientChannel(mono, new ServiceMessageCodec(headersCodec, dataCodecs)); }