From 6862aebb7ecf79f2d5bca805691275ecabd4232a Mon Sep 17 00:00:00 2001 From: heck Date: Wed, 16 Jun 2021 01:56:21 +0200 Subject: [PATCH] Tests: PityTest - transport var rename --- src/PityTransport.cc | 8 +++++--- src/PityTransport.hh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/PityTransport.cc b/src/PityTransport.cc index 2985cb0..8454651 100644 --- a/src/PityTransport.cc +++ b/src/PityTransport.cc @@ -74,7 +74,9 @@ namespace pEp { return ret; } - std::string PityTransport::receiveMsg(int timeout_msec) const + // Blocking + // Returns when a msg has been received + std::string PityTransport::receiveMsg(int poll_interval) const { pEpLogClass("called"); std::string ret; @@ -84,8 +86,8 @@ namespace pEp { ret = pollMsg(); retry = false; } catch (const std::underflow_error&) { - pEpLogClass("polling again in [ms]: " + std::to_string(timeout_msec) + "..."); - Utils::sleep_millis(timeout_msec); + pEpLogClass("polling again in [ms]: " + std::to_string(poll_interval) + "..."); + Utils::sleep_millis(poll_interval); retry = true; } } while (retry); diff --git a/src/PityTransport.hh b/src/PityTransport.hh index b0f4cd4..a5c8caa 100644 --- a/src/PityTransport.hh +++ b/src/PityTransport.hh @@ -25,7 +25,7 @@ namespace pEp { bool hasMsg() const; void sendMsg(const std::string nodename, const std::string& msg) const; std::string pollMsg() const; - std::string receiveMsg(int timeout_msec = 100) const; + std::string receiveMsg(int poll_interval = 100) const; //internal logging static bool debug_log_enabled;