File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
lib/sdk/server/src/main/java/com/launchdarkly/sdk/server Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public CompletableFuture<FDv2SourceResult> next() {
6464
6565 // Monitor the start future for errors
6666 // The data source will emit updates through the listening sink
67- CompletableFuture . runAsync (() -> {
67+ Thread monitorThread = new Thread (() -> {
6868 try {
6969 startFuture .get ();
7070 } catch (ExecutionException e ) {
@@ -77,11 +77,14 @@ public CompletableFuture<FDv2SourceResult> next() {
7777 );
7878 resultQueue .put (FDv2SourceResult .interrupted (errorInfo , false ));
7979 } catch (CancellationException e ) {
80- // Start future was cancelled (during close) - exit cleanly
80+ // Start future was canceled (during close) - exit cleanly
8181 } catch (InterruptedException e ) {
8282 Thread .currentThread ().interrupt ();
8383 }
8484 });
85+ monitorThread .setName ("LaunchDarkly-SDK-Server-DataSourceAdapter-Monitor" );
86+ monitorThread .setDaemon (true );
87+ monitorThread .start ();
8588 }
8689 }
8790
You can’t perform that action at this time.
0 commit comments