Skip to content

Commit

Permalink
Update src/protocols/bdx/AsyncTransferFacilitator.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
nivi-apple and bzbarsky-apple authored Jan 31, 2025
1 parent a127e02 commit f10162a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/protocols/bdx/AsyncTransferFacilitator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,12 @@ void AsyncResponder::NotifyEventHandled(const TransferSession::OutputEventType e

// If this is the end of the transfer (whether a clean end, or some sort of error condition), ensure
// that we destroy ourselves after unwinding the processing loop in the ProcessOutputEvents API.
// We can ignore the status for these messages since the state machine is in a bad, unrecoverable
// state and we should stop processing events and clean up.
// We can ignore the status for output events because none of them are supposed to result in
// us sending a StatusReport, and that's all we use the status for.
//
// In particular, for kTransferTimeout, kAckEOFReceived, and kStatusReceived per spec we
// are not supposed to reply with a StatusReport. And for kInternalError the state machine
// is in an unrecoverable state of some sort, and we should stop trying to make use of it.
if (eventType == TransferSession::OutputEventType::kAckEOFReceived ||
eventType == TransferSession::OutputEventType::kStatusReceived ||
eventType == TransferSession::OutputEventType::kInternalError ||
Expand Down

0 comments on commit f10162a

Please sign in to comment.