Skip to content

Commit

Permalink
copy it directly
Browse files Browse the repository at this point in the history
  • Loading branch information
cnbatch committed Mar 4, 2023
1 parent 19b688b commit 5f12203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/networks/connections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ void udp_client::handle_receive(std::unique_ptr<uint8_t[]> buffer_cache, const a
udp::endpoint copy_of_incoming_endpoint = incoming_endpoint;
start_receive();
//callback(buffer_cache, bytes_transferred, std::move(copy_of_incoming_endpoint), local_port);
asio::post(task_assigner, [this, data_ptr = std::move(buffer_cache), bytes_transferred, peer_ep = std::move(copy_of_incoming_endpoint), local_port]() mutable
asio::post(task_assigner, [this, data_ptr = std::move(buffer_cache), bytes_transferred, copy_of_incoming_endpoint, local_port]() mutable
{
callback(std::move(data_ptr), bytes_transferred, std::move(peer_ep), local_port);
callback(std::move(data_ptr), bytes_transferred, copy_of_incoming_endpoint, local_port);
});
}

0 comments on commit 5f12203

Please sign in to comment.