diff --git a/CHANGES.txt b/CHANGES.txt
index 1001aa2e6..ff03376f7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+4.18.1 (Sep 30, 2025)
+- Fixed an issue where Streaming client hangs during token renew process.
+
4.18.0 (Sep 12, 2025)
- Added new configuration for Fallback Treatments, which allows setting a treatment value and optional config to be returned in place of "control", either globally or by flag. Read more in our docs.
diff --git a/client/pom.xml b/client/pom.xml
index 4db1af756..93bb93ee4 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -5,9 +5,9 @@
io.split.client
java-client-parent
- 4.18.0
+ 4.18.1
- 4.18.0
+ 4.18.1
java-client
jar
Java Client
@@ -171,7 +171,7 @@
org.apache.httpcomponents.client5
httpclient5
- 5.4.4
+ 5.5
com.google.code.gson
diff --git a/client/src/main/java/io/split/client/SplitClientConfig.java b/client/src/main/java/io/split/client/SplitClientConfig.java
index e6e7a70af..3a38fccdb 100644
--- a/client/src/main/java/io/split/client/SplitClientConfig.java
+++ b/client/src/main/java/io/split/client/SplitClientConfig.java
@@ -1071,6 +1071,7 @@ private void verifyRates() {
if (_metricsRefreshRate < 30) {
throw new IllegalArgumentException("metricsRefreshRate must be >= 30: " + _metricsRefreshRate);
}
+
if(_telemetryRefreshRate < 60) {
throw new IllegalStateException("_telemetryRefreshRate must be >= 60");
}
diff --git a/client/src/main/java/io/split/engine/common/PushManagerImp.java b/client/src/main/java/io/split/engine/common/PushManagerImp.java
index 4862765f4..d7b5d8ae7 100644
--- a/client/src/main/java/io/split/engine/common/PushManagerImp.java
+++ b/client/src/main/java/io/split/engine/common/PushManagerImp.java
@@ -118,6 +118,8 @@ public void start() {
} else {
_pushStatusTracker.forcePushDisable();
}
+ } catch (Exception e) {
+ _log.debug("Exception in PushManager start: " + e.getMessage());
} finally {
lock.unlock();
}
@@ -129,6 +131,8 @@ public void stop() {
lock.lock();
_log.debug("Stopping PushManagerImp");
cleanUpResources();
+ } catch (Exception e) {
+ _log.debug("Exception in stopping push manager: " + e.getMessage());
} finally {
lock.unlock();
}
@@ -156,14 +160,22 @@ private boolean startSse(String token, String channels) {
@Override
public void startWorkers() {
- _featureFlagsWorker.start();
- _segmentWorker.start();
+ try {
+ _featureFlagsWorker.start();
+ _segmentWorker.start();
+ } catch (Exception e) {
+ _log.debug("Exception in starting workers: " + e.getMessage());
+ }
}
@Override
public void stopWorkers() {
- _featureFlagsWorker.stop();
- _segmentWorker.stop();
+ try {
+ _featureFlagsWorker.stop();
+ _segmentWorker.stop();
+ } catch (Exception e) {
+ _log.debug("Exception in stopping workers: " + e.getMessage());
+ }
}
private void cleanUpResources() {
@@ -174,4 +186,4 @@ private void cleanUpResources() {
_nextTokenRefreshTask.cancel(false);
}
}
-}
\ No newline at end of file
+}
diff --git a/client/src/main/java/io/split/engine/sse/client/SSEClient.java b/client/src/main/java/io/split/engine/sse/client/SSEClient.java
index aac6f5566..4b5114062 100644
--- a/client/src/main/java/io/split/engine/sse/client/SSEClient.java
+++ b/client/src/main/java/io/split/engine/sse/client/SSEClient.java
@@ -9,6 +9,7 @@
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
+import org.apache.hc.core5.io.CloseMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -115,19 +116,18 @@ public boolean isOpen() {
}
public void close() {
+ _log.debug("closing SSE client");
try {
lock.lock();
_forcedStop.set(true);
if (_state.compareAndSet(ConnectionState.OPEN, ConnectionState.CLOSED)) {
if (_ongoingResponse.get() != null) {
- try {
- _ongoingRequest.get().abort();
- _ongoingResponse.get().close();
- } catch (IOException e) {
- _log.debug(String.format("SSEClient close forced: %s", e.getMessage()));
- }
+ _ongoingRequest.get().abort();
+ _ongoingResponse.get().close(CloseMode.IMMEDIATE);
}
}
+ } catch (Exception e) {
+ _log.debug("Exception in closing SSE client: " + e.getMessage());
} finally {
lock.unlock();
}
@@ -184,6 +184,7 @@ private void connectAndLoop(URI uri, CountDownLatch signal) {
}
}
} catch (Exception e) { // Any other error non related to the connection disables streaming altogether
+ _log.debug(String.format("SSE connection exception: %s", e.getMessage()));
_telemetryRuntimeProducer
.recordStreamingEvents(new StreamingEvent(StreamEventsEnum.SSE_CONNECTION_ERROR.getType(),
StreamEventsEnum.SseConnectionErrorValues.NON_REQUESTED_CONNECTION_ERROR.getValue(),
@@ -191,12 +192,7 @@ private void connectAndLoop(URI uri, CountDownLatch signal) {
_log.warn(e.getMessage(), e);
_statusCallback.apply(StatusMessage.NONRETRYABLE_ERROR);
} finally {
- try {
- _ongoingResponse.get().close();
- } catch (IOException e) {
- _log.debug(e.getMessage());
- }
-
+ _ongoingResponse.get().close(CloseMode.IMMEDIATE);
_state.set(ConnectionState.CLOSED);
_log.debug("SSEClient finished.");
_forcedStop.set(false);
diff --git a/client/src/main/java/io/split/engine/sse/workers/Worker.java b/client/src/main/java/io/split/engine/sse/workers/Worker.java
index 7d2dd21ab..b5ba84f24 100644
--- a/client/src/main/java/io/split/engine/sse/workers/Worker.java
+++ b/client/src/main/java/io/split/engine/sse/workers/Worker.java
@@ -22,11 +22,11 @@ public Worker(String workerName) {
public void start() {
if (_running.compareAndSet(false, true)) {
- _log.debug(String.format("%s Worker starting ...", _workerName));
_queue.clear();
_thread = new Thread( this);
_thread.setName(String.format("%s-worker", _workerName));
_thread.start();
+ _log.debug(String.format("%s Worker started ...", _workerName));
} else {
_log.debug(String.format("%s Worker already running.", _workerName));
return;
diff --git a/okhttp-modules/pom.xml b/okhttp-modules/pom.xml
index ec03d10dd..2971f627d 100644
--- a/okhttp-modules/pom.xml
+++ b/okhttp-modules/pom.xml
@@ -5,10 +5,10 @@
java-client-parent
io.split.client
- 4.18.0
+ 4.18.1
4.0.0
- 4.18.0
+ 4.18.1
okhttp-modules
jar
http-modules
@@ -55,7 +55,7 @@
org.apache.httpcomponents.client5
httpclient5
- 5.4.1
+ 5.5
diff --git a/pluggable-storage/pom.xml b/pluggable-storage/pom.xml
index 94604cfdc..0b67454d6 100644
--- a/pluggable-storage/pom.xml
+++ b/pluggable-storage/pom.xml
@@ -6,7 +6,7 @@
java-client-parent
io.split.client
- 4.18.0
+ 4.18.1
2.1.0
diff --git a/pom.xml b/pom.xml
index 90b70d29b..58fa66801 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
io.split.client
java-client-parent
- 4.18.0
+ 4.18.1
diff --git a/redis-wrapper/pom.xml b/redis-wrapper/pom.xml
index c39bc2cd4..0794a708d 100644
--- a/redis-wrapper/pom.xml
+++ b/redis-wrapper/pom.xml
@@ -6,7 +6,7 @@
java-client-parent
io.split.client
- 4.18.0
+ 4.18.1
redis-wrapper
3.1.1
diff --git a/testing/pom.xml b/testing/pom.xml
index cd4ae5504..6439f6169 100644
--- a/testing/pom.xml
+++ b/testing/pom.xml
@@ -5,11 +5,11 @@
io.split.client
java-client-parent
- 4.18.0
+ 4.18.1
java-client-testing
jar
- 4.18.0
+ 4.18.1
Java Client For Testing
Testing suite for Java SDK for Split