🐛 Fixes for actual use
parent
aad8ffdedd
commit
4a1e1a7c23
|
@ -1,5 +1,6 @@
|
|||
/Cargo.lock
|
||||
/old-git.tar.gz
|
||||
/config
|
||||
/*.tar.gz
|
||||
/ptth_server.toml
|
||||
/ptth_relay.toml
|
||||
/target
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
body {
|
||||
font-family: sans;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.entry {
|
||||
display: inline-block;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
body {
|
||||
font-family: sans;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.entry {
|
||||
display: inline-block;
|
||||
|
|
|
@ -16,7 +16,7 @@ async fn main () -> Result <(), Box <dyn Error>> {
|
|||
use std::io::Read;
|
||||
|
||||
let config_file = {
|
||||
let config_file_path = "ptth_server.toml";
|
||||
let config_file_path = "config/ptth_server.toml";
|
||||
|
||||
let mut f = std::fs::File::open (config_file_path).expect (&format! ("Can't open {:?}", config_file_path));
|
||||
let mut buffer = vec! [0u8; 4096];
|
||||
|
|
|
@ -110,7 +110,7 @@ mod tests {
|
|||
let config_file = server::ConfigFile {
|
||||
name: server_name.into (),
|
||||
api_key: api_key.into (),
|
||||
relay_url: relay_url.into (),
|
||||
relay_url: "http://127.0.0.1:4000/7ZSFUKGV".into (),
|
||||
file_server_root: None,
|
||||
};
|
||||
spawn (async move {
|
||||
|
|
|
@ -80,7 +80,7 @@ async fn handle_req_resp <'a> (
|
|||
};
|
||||
|
||||
let mut resp_req = state.client
|
||||
.post (&format! ("{}/7ZSFUKGV/http_response/{}", state.config.relay_url, req_id))
|
||||
.post (&format! ("{}/http_response/{}", state.config.relay_url, req_id))
|
||||
.header (crate::PTTH_MAGIC_HEADER, base64::encode (rmp_serde::to_vec (&response.parts).unwrap ()));
|
||||
|
||||
if let Some (body) = response.body {
|
||||
|
@ -152,7 +152,7 @@ pub async fn main (config_file: ConfigFile, opt: Opt)
|
|||
delay_for (Duration::from_millis (backoff_delay)).await;
|
||||
}
|
||||
|
||||
let req_req = state.client.get (&format! ("{}/7ZSFUKGV/http_listen/{}", state.config.relay_url, config_file.name));
|
||||
let req_req = state.client.get (&format! ("{}/http_listen/{}", state.config.relay_url, config_file.name));
|
||||
|
||||
let err_backoff_delay = std::cmp::min (30_000, backoff_delay * 2 + 500);
|
||||
|
||||
|
|
Loading…
Reference in New Issue