From 31b1241de8027405d47f0c6fc6518c3856949ea3 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 29 Jun 2021 11:40:08 +0200 Subject: [PATCH] uorb_microcdr: collect all messages Without this we are potentially too slow to collect them all which can lead to the buffer in protocol_splitter to overflow and be reset. --- msg/templates/uorb_microcdr/microRTPS_client.cpp.em | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msg/templates/uorb_microcdr/microRTPS_client.cpp.em b/msg/templates/uorb_microcdr/microRTPS_client.cpp.em index fc06ddf3ff..da443bbc10 100644 --- a/msg/templates/uorb_microcdr/microRTPS_client.cpp.em +++ b/msg/templates/uorb_microcdr/microRTPS_client.cpp.em @@ -255,7 +255,7 @@ void micrortps_start_topics(const uint32_t &datarate, struct timespec &begin, ui while (!_should_exit_task) { @[if recv_topics]@ - if (0 < (read = transport_node->read(&topic_ID, data_buffer, BUFFER_SIZE))) { + while (0 < (read = transport_node->read(&topic_ID, data_buffer, BUFFER_SIZE))) { total_rcvd += read; rx_last_sec_read += read;