Skip to content

Commit

Permalink
update CI, and fix linux and macos code
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrtgs committed Aug 15, 2024
1 parent 96301ec commit 2bfc400
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt --check
command: fmt
args: --check
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async fn generate_dispatcher() -> io::Result<()> {

let target_path = {
let path =
format!("./modules/linux-dispatcher/target/{target}/release/linux-dispatcher");
format!("./modules/linux-dispatcher/target/{target}/linux-dispatcher/linux-dispatcher");
// try to UPX
Command::new("upx").args(["--best", &*path]);
tokio::fs::try_exists(&path)
Expand Down
7 changes: 1 addition & 6 deletions src/network_listener/macos.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#![cfg(target_os = "macos")]

use crate::dbg_println;
use crate::updaters::Updater;
use crate::util::new_skip_interval_after;
use std::convert::Infallible;
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use std::time::Duration;
use system_configuration::network_reachability::{
ReachabilityFlags, SCNetworkReachability, SchedulingError, SetCallbackError,
};
use tokio::sync::Notify;
use tokio::task::JoinHandle;

#[derive(thiserror::Error, Debug)]
Expand Down Expand Up @@ -37,7 +32,7 @@ fn has_internet_from_flags(flags: ReachabilityFlags) -> bool {

pub fn subscribe(updater: Updater) -> JoinHandle<()> {
tokio::task::spawn(async move {
let res = super::fallback_listen(&updater);
let res = super::fallback_listen(&updater).await;
updater.exit(res)
})
}

0 comments on commit 2bfc400

Please sign in to comment.