Also ignore undeliverable InterruptedIOExceptions

This commit is contained in:
ByteHamster 2019-09-01 12:00:28 +02:00
parent 8e0e9cc4cb
commit ebd409f8ab

View File

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