File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore/remote Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,21 @@ private void close(State finalState, Status status) {
352352 getClass ().getSimpleName (),
353353 "(%x) Closing stream client-side" ,
354354 System .identityHashCode (this ));
355- call .halfClose ();
355+ try {
356+ call .halfClose ();
357+ } catch (IllegalStateException e ) {
358+ // Secondary failure encountered. The underlying RPC has entered an error state. We will
359+ // log and continue since the RPC is being discarded anyway.
360+ //
361+ // Example, "IllegalStateException: call was cancelled" was observed in
362+ // https://github.com/firebase/firebase-android-sdk/issues/6883
363+ // Likely caused by other part of system already cancelling stream.
364+ Logger .debug (
365+ getClass ().getSimpleName (),
366+ "(%x) Closing stream client-side result in exception: [%s]" ,
367+ System .identityHashCode (this ),
368+ e );
369+ }
356370 }
357371 call = null ;
358372 }
You can’t perform that action at this time.
0 commit comments