fix using same federation reqwest pool after sender deduplication.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
ca1c77d76b
commit
7f6c19f066
2 changed files with 8 additions and 9 deletions
src/service/sending
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue