diff --git a/src/messaging/ExchangeMgr.cpp b/src/messaging/ExchangeMgr.cpp index 1ffce3e3de0316..dddc9c6fd4ce8f 100644 --- a/src/messaging/ExchangeMgr.cpp +++ b/src/messaging/ExchangeMgr.cpp @@ -300,9 +300,17 @@ void ExchangeManager::OnMessageReceived(const PacketHeader & packetHeader, const // an ack to the peer. else if (!payloadHeader.NeedsAck()) { - // Using same error message for all errors to reduce code size. - ChipLogError(ExchangeManager, "OnMessageReceived failed, err = %" CHIP_ERROR_FORMAT, - CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR.Format()); + // We can easily get standalone acks here: any time we fail to get a + // timely ack for the last message in an exchange and retransmit it, + // then get acks for both the message and the retransmit, the second ack + // will end up in this block. That's not really an error condition, so + // there is no need to log an error in that case. + if (!payloadHeader.HasMessageType(Protocols::SecureChannel::MsgType::StandaloneAck)) + { + // Using same error message for all errors to reduce code size. + ChipLogError(ExchangeManager, "OnMessageReceived failed, err = %" CHIP_ERROR_FORMAT, + CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR.Format()); + } return; }