Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inotify: Ignore any error sending the RenameTimeout event. #373

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/inotify.rs
Expand Up @@ -416,10 +416,11 @@ impl EventLoop {
let cookie = rename_event.tracker().unwrap(); // unwrap is safe because rename_event is always set with some cookie
thread::spawn(move || {
thread::sleep(Duration::from_millis(10)); // wait up to 10 ms for a subsequent event
event_loop_tx
.send(EventLoopMsg::RenameTimeout(cookie))
.unwrap();
waker.wake().unwrap();

// An error here means the other end of the channel was closed, a thing that can
// happen normally.
let _ = event_loop_tx.send(EventLoopMsg::RenameTimeout(cookie));
let _ = waker.wake();
});
}
}
Expand Down