Skip to content

Commit

Permalink
Fixed stupid error
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameo007 committed Jul 21, 2023
1 parent 6bf2fbd commit 2a7a4ea
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Rust Middleware/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@ fn main() {
let log = line.strip_suffix("\n").unwrap();
println!("{}", log);
log_to_server(log);
}

//Run pending actions
if !channel.is_empty() {
let new_timestamp = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs();

if last_timestamp + 15 < new_timestamp {
last_timestamp = new_timestamp;
let action = api_get_next_pending_action(&channel);
send(com, &action.value);
}
//Run pending actions
if !channel.is_empty() {
let new_timestamp = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs();

if last_timestamp + 15 < new_timestamp {
last_timestamp = new_timestamp;
let action = api_get_next_pending_action(&channel);
send(com, &action.value);
}
}
}
Expand Down

0 comments on commit 2a7a4ea

Please sign in to comment.