Skip to content

Commit

Permalink
http1: Do not reset the transport pointer
Browse files Browse the repository at this point in the history
This allows code-reuse from custom implementations where only the deliver
deliver callback differs.
  • Loading branch information
nigoroll committed Nov 9, 2024
1 parent e7d41bc commit 032ddf1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bin/varnishd/http1/cache_http1_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ http1_req(struct worker *wrk, void *arg)
CAST_OBJ_NOTNULL(req, arg, REQ_MAGIC);

THR_SetRequest(req);
req->transport = &HTTP1_transport;
assert(!WS_IsReserved(wrk->aws));
HTTP1_Session(wrk, req);
AZ(wrk->v1l);
Expand Down Expand Up @@ -309,8 +308,7 @@ HTTP1_Session(struct worker *wrk, struct req *req)
*/
if (http1_getstate(sp) == H1NEWREQ)
VTCP_blocking(sp->fd);

req->transport = &HTTP1_transport;
req->transport = XPORT_ByNumber(sp->sattr[SA_TRANSPORT]);

while (1) {
st = http1_getstate(sp);
Expand Down

0 comments on commit 032ddf1

Please sign in to comment.