diff --git a/src/darwin/Framework/CHIP/MTRDiagnosticLogsTransferHandler.mm b/src/darwin/Framework/CHIP/MTRDiagnosticLogsTransferHandler.mm index 4624d604b1e701..8caada05554dbb 100644 --- a/src/darwin/Framework/CHIP/MTRDiagnosticLogsTransferHandler.mm +++ b/src/darwin/Framework/CHIP/MTRDiagnosticLogsTransferHandler.mm @@ -93,12 +93,12 @@ } else if (event.EventType != TransferSession::OutputEventType::kMsgToSend || !event.msgTypeData.HasMessageType(MessageType::BlockAckEOF)) { error = CHIP_ERROR_INTERNAL; } + Reset(); // Notify the MTRDevice via the callback that the BDX transfer has completed with error or success. if (mCallback) { mCallback(error != CHIP_NO_ERROR ? NO : YES); } - Reset(); return error; }