File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 34
34
35
35
#include < statistics/rtps/messages/RTPSStatisticsMessages.hpp>
36
36
37
+ #ifdef FASTDDS_STATISTICS
38
+ const size_t max_boost_buffers = 61 ; // ... + SubMsg header + SubMsg body + Statistics message
39
+ #else
40
+ const size_t max_boost_buffers = 62 ; // ... + SubMsg header + SubMsg body
41
+ #endif // ifdef FASTDDS_STATISTICS
42
+
37
43
namespace eprosima {
38
44
namespace fastdds {
39
45
namespace rtps {
@@ -454,8 +460,8 @@ bool RTPSMessageGroup::insert_submessage(
454
460
return false ;
455
461
}
456
462
457
- // Messages with a submessage bigger than 64KB cannot have more submessages and should be flushed
458
- if (is_big_submessage)
463
+ // Flush when the submessage is bigger than 64KB OR if the number of buffers to send is 64 (boost limit)
464
+ if (is_big_submessage || max_boost_buffers < buffers_to_send_-> size () )
459
465
{
460
466
flush ();
461
467
}
Original file line number Diff line number Diff line change @@ -592,6 +592,11 @@ bool UDPTransportInterface::send(
592
592
EPROSIMA_LOG_WARNING (TRANSPORT_UDP, ec.message ());
593
593
return false ;
594
594
}
595
+
596
+ if (bytesSent != total_bytes)
597
+ {
598
+ EPROSIMA_LOG_WARNING (TRANSPORT_UDP, " Boost send_to wasn't able to send all bytes" );
599
+ }
595
600
}
596
601
catch (const std::exception & error)
597
602
{
You can’t perform that action at this time.
0 commit comments