From c6a5ae8561968ae884179189448ac9f5d4764bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sowa?= Date: Thu, 26 Dec 2024 15:22:42 +0100 Subject: [PATCH] Fix infinite loop in QueueMessageHandler (#987) Co-authored-by: Daisuke Sato --- .../src/rosbridge_library/internal/subscription_modifiers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rosbridge_library/src/rosbridge_library/internal/subscription_modifiers.py b/rosbridge_library/src/rosbridge_library/internal/subscription_modifiers.py index ac129c5c..f05231ed 100644 --- a/rosbridge_library/src/rosbridge_library/internal/subscription_modifiers.py +++ b/rosbridge_library/src/rosbridge_library/internal/subscription_modifiers.py @@ -163,6 +163,7 @@ def run(self): traceback.print_exc(file=sys.stderr) while self.time_remaining() == 0 and len(self.queue) > 0: try: - MessageHandler.handle_message(self, self.queue[0]) + msg = self.queue.popleft() + MessageHandler.handle_message(self, msg) except Exception: traceback.print_exc(file=sys.stderr)