mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 23:59:59 -05:00
fix: call unwatch when dropping FsEventsResource (#4266)
This commit is contained in:
parent
2e59007214
commit
afea9b2edd
1 changed files with 3 additions and 1 deletions
|
@ -76,7 +76,9 @@ pub fn op_fs_events_open(
|
|||
Watcher::new_immediate(move |res: Result<NotifyEvent, NotifyError>| {
|
||||
let res2 = res.map(FsEvent::from).map_err(ErrBox::from);
|
||||
let mut sender = sender.lock().unwrap();
|
||||
futures::executor::block_on(sender.send(res2)).expect("fs events error");
|
||||
// Ignore result, if send failed it means that watcher was already closed,
|
||||
// but not all messages have been flushed.
|
||||
let _ = futures::executor::block_on(sender.send(res2));
|
||||
})
|
||||
.map_err(ErrBox::from)?;
|
||||
let recursive_mode = if args.recursive {
|
||||
|
|
Loading…
Reference in a new issue