Skip to content

Commit 36d1001

Browse files
authored
fix: graceful flagsmith provider shutdown (#1305)
Signed-off-by: Paul <[email protected]>
1 parent 6180d82 commit 36d1001

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

providers/flagsmith/src/main/java/dev.openfeature.contrib.providers.flagsmith/FlagsmithProvider.java

+8
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,12 @@ private Structure mapToStructure(Map<String, Object> map) {
244244
.filter(e -> e.getValue() != null)
245245
.collect(Collectors.toMap(Map.Entry::getKey, e -> objectToValue(e.getValue()))));
246246
}
247+
248+
@Override
249+
public void shutdown() {
250+
log.info("Flagsmith Provider shutting down");
251+
if (flagsmith != null) {
252+
flagsmith.close();
253+
}
254+
}
247255
}

0 commit comments

Comments
 (0)