feat(wm): delete stale sub socket files

This commit is contained in:
LGUG2Z
2024-10-08 16:29:17 -07:00
parent 6f27de8e5c
commit c57759242a

View File

@@ -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![];