|
@ -340,6 +340,8 @@ void PeerSession::doRead() |
|
|
if (ec) |
|
|
if (ec) |
|
|
dropped(); |
|
|
dropped(); |
|
|
else |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
try |
|
|
{ |
|
|
{ |
|
|
m_incoming.resize(m_incoming.size() + length); |
|
|
m_incoming.resize(m_incoming.size() + length); |
|
|
memcpy(m_incoming.data() + m_incoming.size() - length, m_data.data(), length); |
|
|
memcpy(m_incoming.data() + m_incoming.size() - length, m_data.data(), length); |
|
@ -369,6 +371,12 @@ void PeerSession::doRead() |
|
|
} |
|
|
} |
|
|
doRead(); |
|
|
doRead(); |
|
|
} |
|
|
} |
|
|
|
|
|
catch (std::exception const& _e) |
|
|
|
|
|
{ |
|
|
|
|
|
cout << std::setw(2) << m_socket.native_handle() << " | ERROR: " << _e.what() << endl; |
|
|
|
|
|
dropped(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|