Compare commits

..

2 commits

Author SHA1 Message Date
xenofem 331a84627a clean up LiveFileReader using ready! macro 2022-05-10 10:13:47 -04:00
xenofem 2d64f0529c remove empty unused file 2022-05-10 10:09:15 -04:00
2 changed files with 5 additions and 12 deletions

View file

@ -288,19 +288,12 @@ where
if offset >= *this.available_file_size { if offset >= *this.available_file_size {
trace!("waiting for inotify events"); trace!("waiting for inotify events");
file.get_or_insert(inner_file); file.get_or_insert(inner_file);
match this.events.poll_next(cx) { if ready!(this.events.poll_next(cx)).is_none() {
Poll::Pending => { return Poll::Ready(Some(Err(ErrorInternalServerError(
return Poll::Pending; "inotify stream empty",
} ))));
Poll::Ready(Some(_)) => {
return self.poll_next(cx);
}
_ => {
return Poll::Ready(Some(Err(ErrorInternalServerError(
"inotify stream empty",
))));
}
} }
return self.poll_next(cx);
} }
} }

View file