diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index db782eac4b4322..5026813a64af6a 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -231,7 +231,7 @@ CHIP_ERROR CASESession::EstablishSession(const Transport::PeerAddress peerAddres mFabricInfo = fabric; mLocalMRPConfig = mrpConfig; - mExchangeCtxt->SetResponseTimeout(kSigma_Response_Timeout); + mExchangeCtxt->SetResponseTimeout(kSigma_Response_Timeout + mExchangeCtxt->GetAckTimeout()); SetPeerAddress(peerAddress); SetPeerNodeId(peerNodeId); @@ -1454,7 +1454,7 @@ CHIP_ERROR CASESession::ValidateReceivedMessage(ExchangeContext * ec, const Payl else { mExchangeCtxt = ec; - mExchangeCtxt->SetResponseTimeout(kSigma_Response_Timeout); + mExchangeCtxt->SetResponseTimeout(kSigma_Response_Timeout + mExchangeCtxt->GetAckTimeout()); } VerifyOrReturnError(!msg.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index d43f01c5ae0eb8..24cc043cb6e9ff 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -316,7 +316,7 @@ CHIP_ERROR PASESession::Pair(const Transport::PeerAddress peerAddress, uint32_t SuccessOrExit(err); mExchangeCtxt = exchangeCtxt; - mExchangeCtxt->SetResponseTimeout(kSpake2p_Response_Timeout); + mExchangeCtxt->SetResponseTimeout(kSpake2p_Response_Timeout + mExchangeCtxt->GetAckTimeout()); SetPeerAddress(peerAddress); @@ -884,7 +884,7 @@ CHIP_ERROR PASESession::ValidateReceivedMessage(ExchangeContext * exchange, cons else { mExchangeCtxt = exchange; - mExchangeCtxt->SetResponseTimeout(kSpake2p_Response_Timeout); + mExchangeCtxt->SetResponseTimeout(kSpake2p_Response_Timeout + mExchangeCtxt->GetAckTimeout()); } VerifyOrReturnError(!msg.IsNull(), CHIP_ERROR_INVALID_ARGUMENT);