File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
lib/sdk/server/src/main/java/com/launchdarkly/sdk/server Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,27 @@ public PollingSynchronizerImpl(
3939 private void doPoll () {
4040 try {
4141 FDv2SourceResult res = poll (selectorSource .getSelector (), true ).get ();
42+ switch (res .getResultType ()) {
43+ case CHANGE_SET :
44+ break ;
45+ case STATUS :
46+ switch (res .getStatus ().getState ()) {
47+ case INTERRUPTED :
48+ break ;
49+ case SHUTDOWN :
50+ // The base poller doesn't emit shutdown, we instead handle it at this level.
51+ // So when shutdown is called, we return shutdown on subsequent calls to next.
52+ break ;
53+ case TERMINAL_ERROR :
54+ case GOODBYE :
55+ synchronized (this ) {
56+ task .cancel (true );
57+ }
58+ internalShutdown ();
59+ break ;
60+ }
61+ break ;
62+ }
4263 resultQueue .put (res );
4364 } catch (InterruptedException | ExecutionException e ) {
4465 // TODO: Determine if handling is needed.
You can’t perform that action at this time.
0 commit comments