From e7855604139c0d6e151bab98ee97c33369693a01 Mon Sep 17 00:00:00 2001 From: deanlee Date: Wed, 29 May 2024 20:10:51 +0800 Subject: [PATCH] dd --- messaging/impl_msgq.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/messaging/impl_msgq.cc b/messaging/impl_msgq.cc index 51f17a406..631648ad7 100644 --- a/messaging/impl_msgq.cc +++ b/messaging/impl_msgq.cc @@ -83,6 +83,7 @@ Message *MSGQSubSocket::receive(bool non_blocking) { int64_t timieout_ns = ((timeout != -1) ? timeout : 100) * 1000000; int64_t remaining = timieout_ns; auto start = std::chrono::steady_clock::now(); + while (rc == 0 && remaining > 0) { struct timespec ts {remaining / 1000000000, remaining % 1000000000}; int ret = sigtimedwait(&mask, nullptr, &ts);