Skip to content

Commit

Permalink
Increase default buffer size used for OVSDB communication (#345)
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Flynn <tom.flynn@gmail.com>
  • Loading branch information
tomflynn committed Feb 18, 2021
1 parent d5eb19c commit 654a08c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libopflex/comms/transport/PlainText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ void Cb< PlainText >::on_sent(CommunicationPeer const * peer) {

template<>
void Cb< PlainText >::alloc_cb(uv_handle_t * _, size_t size, uv_buf_t* buf) {
*buf = uv_buf_init((char*) malloc(size), size);
return;
// double the size of the buffer
size_t bufferSize = size * 2;
*buf = uv_buf_init((char*) malloc(bufferSize), bufferSize);
}

template<>
Expand Down

0 comments on commit 654a08c

Please sign in to comment.