We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 261a8f4 commit 776d3ebCopy full SHA for 776d3eb
src/cpp/rtps/transport/asio_helpers.hpp
@@ -50,6 +50,8 @@ struct asio_helpers
50
{
51
asio::error_code ec;
52
53
+ assert(initial_buffer_value >= minimum_buffer_value);
54
+
55
final_buffer_value = initial_buffer_value;
56
while (final_buffer_value > minimum_buffer_value)
57
@@ -85,9 +87,10 @@ struct asio_helpers
85
87
if (!ec)
86
88
89
// Last attempt was successful. Get the actual value set.
90
+ int32_t max_value = static_cast<int32_t>(initial_buffer_value);
91
BufferOptionType option;
92
socket.get_option(option, ec);
- if (!ec && (option.value() >= value_to_set))
93
+ if (!ec && (option.value() >= value_to_set) && (option.value() <= max_value))
94
95
final_buffer_value = option.value();
96
return true;
0 commit comments