Also ignore undeliverable InterruptedIOExceptions

This commit is contained in:
ByteHamster 2019-09-01 12:00:28 +02:00
parent 8e0e9cc4cb
commit ebd409f8ab
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,8 @@ import android.util.Log;
import io.reactivex.exceptions.UndeliverableException; import io.reactivex.exceptions.UndeliverableException;
import io.reactivex.plugins.RxJavaPlugins; import io.reactivex.plugins.RxJavaPlugins;
import java.io.InterruptedIOException;
public class RxJavaErrorHandlerSetup { public class RxJavaErrorHandlerSetup {
private RxJavaErrorHandlerSetup() { private RxJavaErrorHandlerSetup() {
@ -15,7 +17,7 @@ public class RxJavaErrorHandlerSetup {
if (e instanceof UndeliverableException) { if (e instanceof UndeliverableException) {
e = e.getCause(); e = e.getCause();
} }
if (e instanceof InterruptedException) { if (e instanceof InterruptedException || e instanceof InterruptedIOException) {
// fine, some blocking code was interrupted by a dispose call // fine, some blocking code was interrupted by a dispose call
Log.d("RxJavaErrorHandler", "Ignored exception: " + Log.getStackTraceString(e)); Log.d("RxJavaErrorHandler", "Ignored exception: " + Log.getStackTraceString(e));
return; return;