mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-18 20:59:57 +00:00
allocated bigger buffer for remaining data
This commit is contained in:
parent
2e1c508bc4
commit
1aae921ce7
@ -538,6 +538,13 @@ namespace transport
|
|||||||
moreBuf = buf;
|
moreBuf = buf;
|
||||||
}
|
}
|
||||||
moreBytes = m_Socket.read_some (boost::asio::buffer (moreBuf + m_ReceiveBufferOffset, moreBytes), ec);
|
moreBytes = m_Socket.read_some (boost::asio::buffer (moreBuf + m_ReceiveBufferOffset, moreBytes), ec);
|
||||||
|
if (ec)
|
||||||
|
{
|
||||||
|
LogPrint (eLogInfo, "NTCP: Read more bytes error: ", ec.message ());
|
||||||
|
delete[] buf;
|
||||||
|
Terminate ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_ReceiveBufferOffset += moreBytes;
|
m_ReceiveBufferOffset += moreBytes;
|
||||||
m_NumReceivedBytes += moreBytes;
|
m_NumReceivedBytes += moreBytes;
|
||||||
i2p::transport::transports.UpdateReceivedBytes (moreBytes);
|
i2p::transport::transports.UpdateReceivedBytes (moreBytes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user