Skip to content

Commit

Permalink
Apply same buffer allocation fix to UDP interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Whitley committed Sep 5, 2019
1 parent 4a9942b commit 3f2ab71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/udp_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ ReturnStatuses UDPInterface::read(std::vector<uint8_t> *msg)
return ReturnStatuses::SOCKET_CLOSED;

boost::system::error_code ec;
msg->reserve(10000);
msg->reserve(socket_.available(), 0);
socket_.receive(boost::asio::buffer(*msg), 0, ec);

if (ec.value() == boost::system::errc::success)
Expand Down

0 comments on commit 3f2ab71

Please sign in to comment.