File tree 1 file changed +2
-4
lines changed
apollo-runtime/src/main/java/com/apollographql/apollo/internal 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -363,8 +363,7 @@ synchronized Optional<Callback<T>> responseCallback() {
363
363
return Optional .fromNullable (originalCallback .get ());
364
364
case IDLE :
365
365
case TERMINATED :
366
- throw new IllegalStateException (
367
- CallState .IllegalStateMessage .forCurrentState (state .get ()).expected (ACTIVE , CANCELED ));
366
+ return Optional .absent ();
368
367
default :
369
368
throw new IllegalStateException ("Unknown state" );
370
369
}
@@ -380,8 +379,7 @@ synchronized Optional<Callback<T>> terminate() {
380
379
return Optional .fromNullable (originalCallback .getAndSet (null ));
381
380
case IDLE :
382
381
case TERMINATED :
383
- throw new IllegalStateException (
384
- CallState .IllegalStateMessage .forCurrentState (state .get ()).expected (ACTIVE , CANCELED ));
382
+ return Optional .absent ();
385
383
default :
386
384
throw new IllegalStateException ("Unknown state" );
387
385
}
You can’t perform that action at this time.
0 commit comments