diff --git a/src/protocols/secure_channel/RendezvousSession.h b/src/protocols/secure_channel/RendezvousSession.h index 0204c6f3a33158..3598ef55c819a1 100644 --- a/src/protocols/secure_channel/RendezvousSession.h +++ b/src/protocols/secure_channel/RendezvousSession.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp index 48ce10a777cdb7..3eb32b6505af14 100644 --- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp +++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp @@ -45,10 +45,8 @@ CHIP_ERROR SessionEstablishmentExchangeDispatch::OnMessageReceived(const Payload const Transport::PeerAddress & peerAddress, ReliableMessageContext * reliableMessageContext) { - ReturnErrorOnFailure(ExchangeMessageDispatch::OnMessageReceived(payloadHeader, messageId, peerAddress, reliableMessageContext)); mPeerAddress = peerAddress; - - return CHIP_NO_ERROR; + return ExchangeMessageDispatch::OnMessageReceived(payloadHeader, messageId, peerAddress, reliableMessageContext); } bool SessionEstablishmentExchangeDispatch::MessagePermitted(uint16_t protocol, uint8_t type) diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h index d2bc0a870affed..3d78091ab3a335 100644 --- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h +++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h @@ -59,9 +59,8 @@ class SessionEstablishmentExchangeDispatch : public Messaging::ExchangeMessageDi bool IsTransportReliable() override { - // If we are not using BLE as the transport, the underlying transport is UDP based. - // (return true only if BLE is being used as the transport) - return (mTransportMgr == nullptr); + // If the underlying transport is not UDP. + return (mPeerAddress.GetTransportType() != Transport::Type::kUdp); } private: