Add debug message to outgoing ping request

master
Edward Shen 2021-07-15 01:19:21 -04:00
parent 6415c3dee6
commit 355fd936ab
Signed by: edward
GPG Key ID: 19182661E818369F
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,7 @@ use crate::CLIENT_API_VERSION;
pub const CONTROL_CENTER_PING_URL: &str = "https://api.mangadex.network/ping";
#[derive(Serialize)]
#[derive(Serialize, Debug)]
pub struct Request<'a> {
secret: &'a ClientSecret,
port: Port,
@ -177,6 +177,7 @@ pub async fn update_server_state(
data: &mut Arc<RwLockServerState>,
) {
let req = Request::from_config_and_state(secret, cli);
debug!("Sending ping request: {:?}", req);
let client = reqwest::Client::new();
let resp = client.post(CONTROL_CENTER_PING_URL).json(&req).send().await;
match resp {