Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nivi-apple committed Jan 31, 2025
1 parent f10162a commit bde7515
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/protocols/bdx/AsyncTransferFacilitator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,16 @@ void AsyncResponder::NotifyEventHandled(const TransferSession::OutputEventType e
// 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 ||
eventType == TransferSession::OutputEventType::kTransferTimeout)
eventType == TransferSession::OutputEventType::kTransferTimeout ||
eventType == TransferSession::OutputEventType::kStatusReceived)
{
mDestroySelfAfterProcessingEvents = true;
}
// If there was an error handling the output event, this should notify the transfer object to abort transfer so it can send a
// status report across the exchange when we call ProcessOutputEvents below.
else if (status != CHIP_NO_ERROR)
{
// If there was an error handling the output event, this should notify the transfer object to abort transfer
// so it can send a status report across the exchange when we call ProcessOutputEvents below.
mTransfer.AbortTransfer(GetBdxStatusCodeFromChipError(status));
}

Expand Down
4 changes: 1 addition & 3 deletions src/protocols/bdx/AsyncTransferFacilitator.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ class AsyncTransferFacilitator : public Messaging::ExchangeDelegate
virtual void DestroySelf() = 0;

/**
* Calling ProcessOutputEvents can destroy this object before the call returns for certain cases
* where the state machine either receives a message indicating termination of the transfer session
* or some error cases where the state machine goes to a bad, unrecoverable state.
* Calling ProcessOutputEvents can destroy this object before the call returns.
*/
void ProcessOutputEvents();

Expand Down

0 comments on commit bde7515

Please sign in to comment.