Skip to content

Commit

Permalink
feat(wm): delete stale sub socket files
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Oct 13, 2024
1 parent 6f27de8 commit c577592
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions komorebi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ pub fn notify_subscribers(notification: &str) -> Result<()> {
for socket in stale_sockets {
tracing::warn!("removing stale subscription: {socket}");
sockets.remove(&socket);
let socket_path = DATA_DIR.join(socket);
if let Err(error) = std::fs::remove_file(&socket_path) {
tracing::error!(
"could not remove stale subscriber socket file at {}: {error}",
socket_path.display()
)
}
}

let mut stale_pipes = vec![];
Expand Down

0 comments on commit c577592

Please sign in to comment.