From 509b3b096123e7a6e906849121a64a9bdf51a0e9 Mon Sep 17 00:00:00 2001 From: Michael West Date: Fri, 7 May 2021 10:45:03 -0700 Subject: 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 --- host/lib/rfnoc/mgmt_portal.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'host/lib') 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 #include #include +#include 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(sleep_s * 1000)); + std::this_thread::sleep_for(std::chrono::milliseconds(static_cast(sleep_s * 1000))); } else { // Configuration is done break; -- cgit v1.2.3