package retrofit2.adapter.rxjava3; import io.reactivex.rxjava3.exceptions.CompositeException; import o.AbstractC13163fSk; import o.C13147fSI; import o.C13418fZu; import o.InterfaceC13174fSv; import o.fSJ; import retrofit2.Call; import retrofit2.Response; /* loaded from: classes.dex */ final class CallExecuteObservable extends AbstractC13163fSk> { private final Call originalCall; /* JADX INFO: Access modifiers changed from: package-private */ public CallExecuteObservable(Call call) { this.originalCall = call; } @Override // o.AbstractC13163fSk public final void subscribeActual(InterfaceC13174fSv> interfaceC13174fSv) { boolean z; Call clone = this.originalCall.clone(); CallDisposable callDisposable = new CallDisposable(clone); interfaceC13174fSv.onSubscribe(callDisposable); if (callDisposable.isDisposed()) { return; } try { Response execute = clone.execute(); if (!callDisposable.isDisposed()) { interfaceC13174fSv.onNext(execute); } if (callDisposable.isDisposed()) { return; } try { interfaceC13174fSv.onComplete(); } catch (Throwable th) { th = th; z = true; C13147fSI.c(th); if (z) { C13418fZu.c(th); return; } if (callDisposable.isDisposed()) { return; } try { interfaceC13174fSv.onError(th); } catch (Throwable th2) { C13147fSI.c(th2); C13418fZu.c(new CompositeException(th, th2)); } } } catch (Throwable th3) { th = th3; z = false; } } /* loaded from: classes6.dex */ static final class CallDisposable implements fSJ { private final Call call; private volatile boolean disposed; CallDisposable(Call call) { this.call = call; } @Override // o.fSJ public final void dispose() { this.disposed = true; this.call.cancel(); } @Override // o.fSJ public final boolean isDisposed() { return this.disposed; } } }