Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit c195b64

Browse files
committed
Start the new ES connection in a finally block
1 parent 3a35a77 commit c195b64

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/launchdarkly/client/StreamProcessor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ public void run() {
211211
start();
212212
} catch (IOException e) {
213213
logger.warn("Encountered exception closing stream connection: " + e.getMessage());
214+
} finally {
215+
if (es.getState() == ReadyState.SHUTDOWN) {
216+
start();
217+
} else {
218+
logger.warn("Expected ES to be in state SHUTDOWN, but it's currently in state " + es.getState().toString());
219+
}
214220
}
215221
}
216222
}

0 commit comments

Comments
 (0)