Skip to content

Commit

Permalink
space
Browse files Browse the repository at this point in the history
  • Loading branch information
taikulawo committed Jul 16, 2024
1 parent a17a5c2 commit 79a87f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pingora-proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,11 @@ where
Some(downstream_session) => Session::new(downstream_session, &self.downstream_modules),
None => return, // bad request
};

// no real downstream to keepalive, but it doesn't matter what is set here because at the end
// of this fn the dummy connection will be dropped
session.set_keepalive(None);

session.subrequest_ctx.replace(sub_req_ctx);
let ctx = self.inner.new_ctx(&session);
trace!("processing subrequest");
Expand All @@ -714,15 +714,15 @@ where
Some(downstream_session) => Session::new(downstream_session, &self.downstream_modules),
None => return None, // bad request
};

if *shutdown.borrow() {
// stop downstream from reusing if this service is shutting down soon
session.set_keepalive(None);
} else {
// default 60s
session.set_keepalive(Some(60));
}

let ctx = self.inner.new_ctx(&session);
self.process_request(session, ctx).await
}
Expand Down

0 comments on commit 79a87f5

Please sign in to comment.