diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c index 1a2abadc99a..5775b6da680 100644 --- a/bin/varnishd/http2/cache_http2_session.c +++ b/bin/varnishd/http2/cache_http2_session.c @@ -442,17 +442,10 @@ static int v_matchproto_(vtr_poll_f) h2_poll(struct req *req) { struct h2_req *r2; - int r = 1; CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CAST_OBJ_NOTNULL(r2, req->transport_priv, H2_REQ_MAGIC); - - Lck_Lock(&r2->h2sess->sess->mtx); - if (r2->error) - r = -1; - Lck_Unlock(&r2->h2sess->sess->mtx); - - return (r); + return (r2->error ? -1 : 1); } struct transport HTTP2_transport = {