aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2021-05-07 10:45:03 -0700
committerAaron Rossetto <aaron.rossetto@ni.com>2021-05-10 14:58:47 -0500
commit509b3b096123e7a6e906849121a64a9bdf51a0e9 (patch)
tree2e426240e21f262429c58c72691b403e2718d757 /host/lib
parent438e27bc73b3ec2546e992be825e53fd812150b4 (diff)
downloaduhd-509b3b096123e7a6e906849121a64a9bdf51a0e9.tar.gz
uhd-509b3b096123e7a6e906849121a64a9bdf51a0e9.tar.bz2
uhd-509b3b096123e7a6e906849121a64a9bdf51a0e9.zip
RFNoc: Fix graph connect timeout error
A loop in mgmt_portal::_validate_stream_setup() was missing a sleep, which was causing it to return long before the timeout with a timeout error. This change adds that sleep and reduces the duration of the sleep so it responds faster. Signed-off-by: Michael West <michael.west@ettus.com>
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/rfnoc/mgmt_portal.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/rfnoc/mgmt_portal.cpp b/host/lib/rfnoc/mgmt_portal.cpp
index 2b843ae03..678e3f260 100644
--- a/host/lib/rfnoc/mgmt_portal.cpp
+++ b/host/lib/rfnoc/mgmt_portal.cpp
@@ -15,6 +15,7 @@
#include <cmath>
#include <mutex>
#include <queue>
+#include <thread>
namespace uhd { namespace rfnoc { namespace mgmt {
@@ -941,12 +942,12 @@ private: // Functions
{
// Get the status of the output stream
uint32_t ostrm_status = 0;
- double sleep_s = 0.05;
+ double sleep_s = 0.001;
for (size_t i = 0; i < size_t(std::ceil(timeout / sleep_s)); i++) {
ostrm_status = std::get<0>(_get_ostrm_status(xport, node_addr));
if ((ostrm_status & STRM_STATUS_SETUP_PENDING) != 0) {
// Wait and retry
- std::chrono::milliseconds(static_cast<int64_t>(sleep_s * 1000));
+ std::this_thread::sleep_for(std::chrono::milliseconds(static_cast<int64_t>(sleep_s * 1000)));
} else {
// Configuration is done
break;