revert redundant wrapping some function calls with error handlers. Error handling is already built into the handler allocator

This commit is contained in:
arvidn 2017-12-27 13:58:25 +01:00 committed by Arvid Norberg
parent 6ba64a1bb3
commit 1884061418
1 changed files with 2 additions and 4 deletions

View File

@ -5651,8 +5651,7 @@ namespace libtorrent {
auto conn = self();
m_socket->async_write_some(vec, make_handler(
[conn](error_code const& ec, std::size_t bt)
{ conn->wrap(&peer_connection::on_send_data, ec, bt); }
std::bind(&peer_connection::on_send_data, conn, _1, _2)
, m_write_handler_storage, *this));
m_channel_state[upload_channel] |= peer_info::bw_network;
@ -5739,8 +5738,7 @@ namespace libtorrent {
auto conn = self();
m_socket->async_read_some(
boost::asio::mutable_buffers_1(vec.data(), vec.size()), make_handler(
[conn](error_code const& ec, std::size_t bt)
{ conn->wrap(&peer_connection::on_receive_data, ec, bt); }
std::bind(&peer_connection::on_receive_data, conn, _1, _2)
, m_read_handler_storage, *this));
}