mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-21 06:45:38 -06:00
unlink socket in case it's left over from a crash
This commit is contained in:
parent
b839097cb2
commit
3b09abb532
1 changed files with 4 additions and 0 deletions
|
|
@ -51,6 +51,10 @@ impl FrontendAdapter {
|
|||
#[cfg(unix)]
|
||||
let socket_path = Path::new(env::var("XDG_RUNTIME_DIR")?.as_str()).join("lan-mouse-socket.sock");
|
||||
#[cfg(unix)]
|
||||
log::debug!("remove socket: {:?}", socket_path);
|
||||
#[cfg(unix)]
|
||||
std::fs::remove_file(&socket_path).unwrap();
|
||||
#[cfg(unix)]
|
||||
let listener = UnixListener::bind(&socket_path)?;
|
||||
|
||||
#[cfg(windows)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue