mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 21:06:39 +01:00
allocated bigger buffer for remaining data
This commit is contained in:
parent
2e1c508bc4
commit
1aae921ce7
1 changed files with 7 additions and 0 deletions
|
@ -538,6 +538,13 @@ namespace transport
|
|||
moreBuf = buf;
|
||||
}
|
||||
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_NumReceivedBytes += moreBytes;
|
||||
i2p::transport::transports.UpdateReceivedBytes (moreBytes);
|
||||
|
|
Loading…
Add table
Reference in a new issue