mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 16:21:24 +01:00
Use enums for options to send_request(), add allow_loopback
This commit is contained in:
parent
94d523ebcb
commit
6022d56094
2 changed files with 31 additions and 7 deletions
|
|
@ -41,7 +41,10 @@ use tracing::{debug, error, warn, Span};
|
|||
|
||||
use super::rooms::timeline::PduId;
|
||||
use crate::{
|
||||
api::{appservice_server, server_server},
|
||||
api::{
|
||||
appservice_server,
|
||||
server_server::{self, AllowLoopbackRequests, LogRequestError},
|
||||
},
|
||||
services,
|
||||
utils::{calculate_hash, debug_slice_truncated},
|
||||
Config, Error, PduEvent, Result,
|
||||
|
|
@ -677,7 +680,12 @@ impl Service {
|
|||
debug!("Got permit");
|
||||
let response = tokio::time::timeout(
|
||||
Duration::from_secs(2 * 60),
|
||||
server_server::send_request(destination, request, true),
|
||||
server_server::send_request(
|
||||
destination,
|
||||
request,
|
||||
LogRequestError::Yes,
|
||||
AllowLoopbackRequests::No,
|
||||
),
|
||||
)
|
||||
.await
|
||||
.map_err(|_| {
|
||||
|
|
@ -901,7 +909,8 @@ async fn handle_federation_event(
|
|||
})))
|
||||
.into(),
|
||||
},
|
||||
false,
|
||||
LogRequestError::No,
|
||||
AllowLoopbackRequests::No,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue