package okhttp3.n0.http2;

import java.io.IOException;
import java.util.List;
import kotlin.Metadata;
import okhttp3.n0.concurrent.Task;

/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\u0011\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016¨\u0006\u0004¸\u0006\u0000"}, d2 = {"okhttp3/internal/concurrent/TaskQueue$execute$1", "Lokhttp3/internal/concurrent/Task;", "runOnce", "", "okhttp"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class i extends Task {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ Http2Connection f9955e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ int f9956f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final /* synthetic */ List f9957g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final /* synthetic */ boolean f9958h;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public i(String str, boolean z2, Http2Connection http2Connection, int i2, List list, boolean z3) {
        super(str, z2);
        this.f9955e = http2Connection;
        this.f9956f = i2;
        this.f9957g = list;
        this.f9958h = z3;
    }

    @Override // okhttp3.n0.concurrent.Task
    public long a() {
        boolean zB = this.f9955e.f9920y.b(this.f9956f, this.f9957g, this.f9958h);
        if (zB) {
            try {
                this.f9955e.M.j(this.f9956f, ErrorCode.CANCEL);
            } catch (IOException unused) {
                return -1L;
            }
        }
        if (!zB && !this.f9958h) {
            return -1L;
        }
        synchronized (this.f9955e) {
            this.f9955e.O.remove(Integer.valueOf(this.f9956f));
        }
        return -1L;
    }
}
