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

data transfer: reuse buffer

Change-Id: I4ede33afd5823eb3ce320a03be10e79fcb417ae8
parent 1cc44ed3
No related branches found
No related tags found
No related merge requests found
......@@ -330,8 +330,8 @@ private:
void sendFile() const
{
dht::ThreadPool::io().run([this]() {
std::vector<char> buf;
while (!input_.eof() && onRecvCb_) {
std::vector<char> buf;
buf.resize(MAX_BUFFER_SIZE);
input_.read(&buf[0], buf.size());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment