From 8883d84b9bb9b941497f502fab971b6c8407c7a5 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 27 Aug 2019 17:53:18 +0900 Subject: [PATCH] Minor fix --- cpp_impl/src/UDPConnection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp_impl/src/UDPConnection.cpp b/cpp_impl/src/UDPConnection.cpp index 9c5ad2e..a082498 100644 --- a/cpp_impl/src/UDPConnection.cpp +++ b/cpp_impl/src/UDPConnection.cpp @@ -313,7 +313,8 @@ void UDPC_update(void *ctx) { if(iter->second.timer >= (iter->second.flags.test(1) ? UDPC::GOOD_MODE_SEND_RATE : UDPC::BAD_MODE_SEND_RATE)) { - iter->second.timer = std::chrono::steady_clock::duration::zero(); + iter->second.timer -= (iter->second.flags.test(1) + ? UDPC::GOOD_MODE_SEND_RATE : UDPC::BAD_MODE_SEND_RATE); iter->second.flags.set(0); } }