summaryrefslogtreecommitdiffstats
path: root/src/stateless/dp/trex_stateless_dp_core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stateless/dp/trex_stateless_dp_core.cpp')
-rw-r--r--src/stateless/dp/trex_stateless_dp_core.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp
index c211b9f5..0a9a88ab 100644
--- a/src/stateless/dp/trex_stateless_dp_core.cpp
+++ b/src/stateless/dp/trex_stateless_dp_core.cpp
@@ -353,8 +353,11 @@ void
TrexStatelessDpCore::idle_state_loop() {
while (m_state == STATE_IDLE) {
- periodic_check_for_cp_messages();
- delay(200);
+ bool had_msg = periodic_check_for_cp_messages();
+ /* if no message - backoff for some time */
+ if (!had_msg) {
+ delay(200);
+ }
}
}