From db52a26d3accadb9f170cb3b2098956186e80069 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 12 Jun 2017 10:32:42 -0700 Subject: mpm: Increased find timeout --- host/lib/usrp/mpmd/mpmd_impl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/mpmd') diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index 23a90976c..ec48138a6 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -42,6 +42,8 @@ namespace { * Local constants ************************************************************************/ const size_t MPMD_CROSSBAR_MAX_LADDR = 255; + //! How long we wait for discovery responses (in seconds) + const double MPMD_FIND_TIMEOUT = 0.5; /************************************************************************* * Helper functions @@ -401,7 +403,10 @@ device_addrs_t mpmd_find_with_addr(const device_addr_t& hint_) device_addrs_t addrs; while (true) { char buff[4096] = {}; - const size_t nbytes = comm->recv(boost::asio::buffer(buff), 0.050); + const size_t nbytes = comm->recv( // TODO make sure we don't buf overflow + boost::asio::buffer(buff), + MPMD_FIND_TIMEOUT + ); if (nbytes == 0) { break; } -- cgit v1.2.3