File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
android-client-sdk/src/main/java/com/devcycle/sdk/android/eventsource Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -174,9 +174,18 @@ public void start() {
174174 DevCycleLogger .i ("Start method called on this already-started EventSource object. Doing nothing" );
175175 return ;
176176 }
177- DevCycleLogger .d ("readyState change: %s -> %s" , RAW , CONNECTING );
178- DevCycleLogger .i ("Starting EventSource client using URI: %s" , url );
179- streamExecutor .execute (this ::run );
177+
178+ try {
179+ DevCycleLogger .d ("readyState change: %s -> %s" , RAW , CONNECTING );
180+ DevCycleLogger .i ("Starting EventSource client using URI: %s" , url );
181+ streamExecutor .execute (this ::run );
182+ } catch (Exception e ) {
183+ if (e instanceof RejectedExecutionException ) {
184+ DevCycleLogger .e ("Error starting EventSource: Task rejected by executor - " , e );
185+ } else {
186+ DevCycleLogger .e ("Error in EventSource run method: %s" , e );
187+ }
188+ }
180189 }
181190
182191 /**
You can’t perform that action at this time.
0 commit comments