File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
apollo-runtime/src/main/java/com/apollographql/apollo/internal Expand file tree Collapse file tree 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() {
363363 return Optional .fromNullable (originalCallback .get ());
364364 case IDLE :
365365 case TERMINATED :
366- throw new IllegalStateException (
367- CallState .IllegalStateMessage .forCurrentState (state .get ()).expected (ACTIVE , CANCELED ));
366+ return Optional .absent ();
368367 default :
369368 throw new IllegalStateException ("Unknown state" );
370369 }
@@ -380,8 +379,7 @@ synchronized Optional<Callback<T>> terminate() {
380379 return Optional .fromNullable (originalCallback .getAndSet (null ));
381380 case IDLE :
382381 case TERMINATED :
383- throw new IllegalStateException (
384- CallState .IllegalStateMessage .forCurrentState (state .get ()).expected (ACTIVE , CANCELED ));
382+ return Optional .absent ();
385383 default :
386384 throw new IllegalStateException ("Unknown state" );
387385 }
You can’t perform that action at this time.
0 commit comments