Skip to content

Commit beb300c

Browse files
committed
Handle IO exceptions in adapter shutdown.
1 parent cf7fc3f commit beb300c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/DataSourceSynchronizerAdapter.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,19 @@ public CompletableFuture<FDv2SourceResult> next() {
9090
}
9191

9292
@Override
93-
public void close() throws IOException {
93+
public void close() {
9494
synchronized (startLock) {
9595
if (closed) {
9696
return;
9797
}
9898
closed = true;
9999
}
100100

101-
dataSource.close();
101+
try {
102+
dataSource.close();
103+
} catch (IOException e) {
104+
// Ignore as we are shutting down.
105+
}
102106
shutdownFuture.complete(FDv2SourceResult.shutdown());
103107
if(startFuture != null) {
104108
// If the start future is done, this has no effect.

0 commit comments

Comments
 (0)