Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion rs/moq-net/src/lite/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,11 @@ impl<S: crate::transport::poll::Session> GroupRecv<S> {
}
};

let GroupRecvState::Serve { group, .. } = std::mem::replace(&mut self.state, GroupRecvState::Done)
// Held until the group settles below, so a frame the track or group cut
// short drops into an already-aborted group instead of reporting a loss.
let GroupRecvState::Serve {
group, ingest: _ingest, ..
} = std::mem::replace(&mut self.state, GroupRecvState::Done)
else {
unreachable!()
};
Expand Down
15 changes: 10 additions & 5 deletions rs/moq-net/src/model/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,16 @@ impl<G: std::borrow::BorrowMut<group::Producer>> Drop for Raw<G> {
if !self.done {
// An unfinished frame leaves the group stream broken; fail the group so
// consumers surface an error instead of hanging on the partial forever.
tracing::warn!(
group = self.group.borrow_mut().info().sequence,
"frame::Producer dropped before writing all bytes"
);
self.group.borrow_mut().frame_abort(Error::Dropped);
// A group already aborted (superseded, evicted, cancelled) carries its own
// reason, so cutting its in-flight frame short is expected.
let group = self.group.borrow_mut();
if !group.is_aborted() {
tracing::warn!(
group = group.info().sequence,
"frame::Producer dropped before writing all bytes"
);
}
group.frame_abort(Error::Dropped);
}
}
}
Expand Down
16 changes: 10 additions & 6 deletions rs/moq-net/src/model/resume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1214,12 +1214,16 @@ impl Group {
Some((_, err)) => {
// The only place a spliced group's loss becomes visible, so say which
// frames went missing rather than leaving a stuck group to explain itself.
tracing::warn!(
group = self.sequence,
frame = self.index,
%err,
"no route can serve the rest of this group"
);
// An old group was skipped on purpose (something newer superseded it), so
// it is not a loss worth reporting.
if !matches!(crate::StreamError::from(err), crate::StreamError::Old) {
tracing::warn!(
group = self.sequence,
frame = self.index,
%err,
"no route can serve the rest of this group"
);
}
Err(err.clone())
}
None => Ok(false),
Expand Down
Loading