Skip to content

Commit

Permalink
ignore OperationCancelled errors
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Dec 6, 2024
1 parent a0da2b4 commit 79c660b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion aws-s3-transfer-manager/src/operation/download/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ pub(super) fn distribute_work(
let resp = svc.oneshot(req).await;
// If any chunk fails, send cancel notification, to kill any other in-flight chunks
if let Err(err) = &resp {
if *err.kind() != ErrorKind::OperationCancelled && cancel_tx.send(true).is_err() {
if *err.kind() == ErrorKind::OperationCancelled {
// Ignore any OperationCancelled errors.
return;
}
if cancel_tx.send(true).is_err() {
tracing::debug!(
"all receiver ends have dropped, unable to send a cancellation signal"
);
Expand Down

0 comments on commit 79c660b

Please sign in to comment.