Use GetLocalMRPConfig for LivenessCheckTimerTimeout (#31466)
* Use GetLocalMRPConfig for LivenessCheckTimerTimeout
* address comment
* Restyled by clang-format
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp
index 77a8e4c..4a123fe 100644
--- a/src/app/ReadClient.cpp
+++ b/src/app/ReadClient.cpp
@@ -945,7 +945,9 @@
// TODO: We need to find a good home for this logic that will correctly compute this based on transport. For now, this will
// suffice since we don't use TCP as a transport currently and subscriptions over BLE aren't really a thing.
//
- const auto & ourMrpConfig = GetDefaultMRPConfig();
+ const auto & localMRPConfig = GetLocalMRPConfig();
+ const auto & defaultMRPConfig = GetDefaultMRPConfig();
+ const auto & ourMrpConfig = localMRPConfig.ValueOr(defaultMRPConfig);
auto publisherTransmissionTimeout =
GetRetransmissionTimeout(ourMrpConfig.mActiveRetransTimeout, ourMrpConfig.mIdleRetransTimeout,
System::SystemClock().GetMonotonicTimestamp(), ourMrpConfig.mActiveThresholdTime);