Skip to content

Commit

Permalink
fix: fail earlier on ping
Browse files Browse the repository at this point in the history
  • Loading branch information
donovanglover committed Jan 12, 2025
1 parent f875eb4 commit c4fa79f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ pub fn exec(address: SocketAddrV4, path: &Path, directory: &str) {

let ping = minreq::get(format!("http://{address}/"))
.with_timeout(1)
.send()
.unwrap();
.send();

if ping.status_code != 200 {
if ping.is_err() {
notify(
&format!("Error: sakaya server is not accessible on {address}."),
None,
);

return;
}

Expand Down

0 comments on commit c4fa79f

Please sign in to comment.