Skip to content

Commit cd8d922

Browse files
authored
fix(nodes): handle moq cancelled error (#21)
1 parent aa742af commit cd8d922

File tree

1 file changed

+9
-1
lines changed
  • crates/nodes/src/transport/moq

1 file changed

+9
-1
lines changed

crates/nodes/src/transport/moq/pull.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,16 @@ impl MoqPullNode {
718718
);
719719
return Ok(StreamEndReason::Natural);
720720
},
721+
Err(moq_lite::Error::Cancel) => {
722+
tracing::debug!(
723+
session_packet_count,
724+
total_packet_count = *total_packet_count,
725+
"Track read cancelled"
726+
);
727+
return Ok(StreamEndReason::Reconnect);
728+
},
721729
Err(e) => {
722-
tracing::error!("Error reading from track: {}", e);
730+
tracing::error!(error = %e, session_packet_count, "Error reading from track");
723731
if session_packet_count > 0 {
724732
tracing::warn!(
725733
"Track ended unexpectedly after {} packets - will retry",

0 commit comments

Comments
 (0)