fix using same federation reqwest pool after sender deduplication.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-04 17:48:12 -07:00 committed by June
commit 7f6c19f066
2 changed files with 8 additions and 9 deletions
src/service/sending

View file

@ -44,7 +44,9 @@ pub enum FedDest {
}
#[tracing::instrument(skip_all, name = "send")]
pub(crate) async fn send_request<T>(destination: &ServerName, request: T) -> Result<T::IncomingResponse>
pub(crate) async fn send_request<T>(
client: &reqwest::Client, destination: &ServerName, request: T,
) -> Result<T::IncomingResponse>
where
T: OutgoingRequest + Debug,
{
@ -202,12 +204,7 @@ where
}
debug!("Sending request to {destination} at {url}");
let response = services()
.globals
.client
.federation
.execute(reqwest_request)
.await;
let response = client.execute(reqwest_request).await;
debug!("Received response from {destination} at {url}");
match response {