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 j extends Task {

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public j(String str, boolean z2, Http2Connection http2Connection, int i2, List list) {
        super(str, z2);
        this.f9959e = http2Connection;
        this.f9960f = i2;
        this.f9961g = list;
    }

    @Override // okhttp3.n0.concurrent.Task
    public long a() {
        if (!this.f9959e.f9920y.a(this.f9960f, this.f9961g)) {
            return -1L;
        }
        try {
            this.f9959e.M.j(this.f9960f, ErrorCode.CANCEL);
            synchronized (this.f9959e) {
                this.f9959e.O.remove(Integer.valueOf(this.f9960f));
            }
            return -1L;
        } catch (IOException unused) {
            return -1L;
        }
    }
}
