Skip to content
Snippets Groups Projects
Commit 5b10c871 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

mxsock: preallocate buffer

Change-Id: I337c6e440d85fb3c4c33b023766d5241e88e9977
parent 28dd9502
No related branches found
No related tags found
No related merge requests found
......@@ -462,7 +462,7 @@ MultiplexedSocket::write(const uint16_t& channel,
ec = std::make_error_code(std::errc::message_size);
return -1;
}
msgpack::sbuffer buffer;
msgpack::sbuffer buffer(len + 16);
msgpack::packer<msgpack::sbuffer> pk(&buffer);
pk.pack_array(2);
pk.pack(channel);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment