diff options
author | 2025-05-18 12:53:18 +0200 | |
---|---|---|
committer | 2025-05-18 12:53:18 +0200 | |
commit | 03a98f385c7df97d77fa7b850ba2ac86e921ad53 (patch) | |
tree | c6285c6221e08ed0b758a214f8718261e762edd6 /src | |
parent | f106973f3a45419eecd713df187a1556929fda19 (diff) | |
download | spaceapi-server-master.tar.gz spaceapi-server-master.tar.bz2 spaceapi-server-master.tar.lz spaceapi-server-master.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index ad15301..bd279e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -76,14 +76,14 @@ async fn fetch_url(url: hyper::Uri) -> Result<Response<Incoming>> { Ok(sender.send_request(req).await?) } -fn get_request_target_uri() -> Uri { - env::var("REQUEST_TO") +fn get_space_open_request_target_uri() -> Uri { + env::var("OPEN_REQUEST_TO") .unwrap_or("http://10.0.0.77:8080/".to_string()) .parse::<hyper::Uri>() .unwrap() } async fn get_is_open() -> Result<bool> { - let mut res = fetch_url(get_request_target_uri()).await?; + let mut res = fetch_url(get_space_open_request_target_uri()).await?; let mut out = "".to_string(); while let Some(next) = res.frame().await { @@ -163,8 +163,8 @@ async fn main() -> Result<()> { println!( "Listening on: LISTEN_ON={addr:#?} -Sending fetch requests to: REQUEST_TO={:#?}", - get_request_target_uri() +Sending fetch requests to: OPEN_REQUEST_TO={:#?}", + get_space_open_request_target_uri() ); // We start a loop to continuously accept incoming connections |