Skip to content

Commit db60cec

Browse files
authored
Merge branch 'development' into feature/impression-properties
2 parents 09285f3 + 69e44f8 commit db60cec

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
4.14.1 (XXX XX, XXXX)
2+
- Prevent polling threads from starting when the SDK calls destroy method.
3+
14
4.14.0 (Jan 17, 2025)
25
- Added support for the new impressions tracking toggle available on feature flags, both respecting the setting and including the new field being returned on SplitView type objects. Read more in our docs.
36
- Cleaned unused imports to fix a collision issue.

client/src/main/java/io/split/client/JsonLocalhostSplitChangeFetcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ private SplitChange processSplitChange(SplitChange splitChange, long changeNumbe
4747
return null;
4848
}
4949
String splitJson = splitChange.splits.toString();
50-
MessageDigest digest = MessageDigest.getInstance("SHA-1");
50+
MessageDigest digest = MessageDigest.getInstance("SHA-256");
5151
digest.reset();
5252
digest.update(splitJson.getBytes());
5353
// calculate the json sha
5454
byte [] currHash = digest.digest();
5555
//if sha exist and is equal to before sha, or if till is equal to default till returns the same segmentChange with till equals to storage CN
56-
if (Arrays.equals(lastHash, currHash) || splitChangeToProcess.till == -1) {
56+
if (java.security.MessageDigest.isEqual(lastHash, currHash) || splitChangeToProcess.till == -1) {
5757
splitChangeToProcess.till = changeNumber;
5858
}
5959
lastHash = currHash;

client/src/main/java/io/split/engine/common/SyncManagerImp.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ private void startPollingMode() {
212212
case STREAMING_DOWN:
213213
_log.info("Streaming service temporarily unavailable, working in polling mode.");
214214
_pushManager.stopWorkers();
215+
// if the whole SDK is being shutdown, don't start polling,
216+
// in case the polling threads are not terminated and a graceful shutdown will fail.
217+
if(_shuttedDown.get()) {
218+
break;
219+
}
215220
_synchronizer.startPeriodicFetching();
216221
break;
217222
case STREAMING_BACKOFF:

0 commit comments

Comments
 (0)