Skip to content

Commit

Permalink
cleanup socket at exit
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Aug 26, 2024
1 parent b551685 commit 2003693
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,5 +369,11 @@ pub fn run(cli: cli::Serve) -> Result<()> {
}

st.active.store(false, atomic::Ordering::SeqCst);

// try to remove socket file
if let Err(err) = std::fs::remove_file(&socket_path) {
log::warn!("Error when deleting socket file at exit: {err:?}")
}

Ok(())
}

0 comments on commit 2003693

Please sign in to comment.