mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
Compare commits
4 commits
43939cedf4
...
ec67f48d85
Author | SHA1 | Date | |
---|---|---|---|
|
ec67f48d85 | ||
|
3a229ea65c | ||
|
0e8d624d86 | ||
|
8f9874570a |
3 changed files with 6 additions and 6 deletions
|
@ -1822,7 +1822,7 @@ namespace transport
|
||||||
LogPrint(eLogError, "NTCP2: HTTP proxy write error ", ec.message());
|
LogPrint(eLogError, "NTCP2: HTTP proxy write error ", ec.message());
|
||||||
});
|
});
|
||||||
|
|
||||||
boost::asio::streambuf * readbuff = new boost::asio::streambuf;
|
auto readbuff = std::make_shared<boost::asio::streambuf>();
|
||||||
boost::asio::async_read_until(conn->GetSocket(), *readbuff, "\r\n\r\n",
|
boost::asio::async_read_until(conn->GetSocket(), *readbuff, "\r\n\r\n",
|
||||||
[readbuff, timer, conn] (const boost::system::error_code & ec, std::size_t transferred)
|
[readbuff, timer, conn] (const boost::system::error_code & ec, std::size_t transferred)
|
||||||
{
|
{
|
||||||
|
@ -1842,7 +1842,6 @@ namespace transport
|
||||||
{
|
{
|
||||||
timer->cancel();
|
timer->cancel();
|
||||||
conn->ClientLogin();
|
conn->ClientLogin();
|
||||||
delete readbuff;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1852,7 +1851,6 @@ namespace transport
|
||||||
LogPrint(eLogError, "NTCP2: HTTP proxy gave malformed response");
|
LogPrint(eLogError, "NTCP2: HTTP proxy gave malformed response");
|
||||||
timer->cancel();
|
timer->cancel();
|
||||||
conn->Terminate();
|
conn->Terminate();
|
||||||
delete readbuff;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1277,10 +1277,12 @@ namespace stream
|
||||||
m_WindowSize += (m_WindowSize - (1 - PREV_SPEED_KEEP_TIME_COEFF)) / m_WindowSize;
|
m_WindowSize += (m_WindowSize - (1 - PREV_SPEED_KEEP_TIME_COEFF)) / m_WindowSize;
|
||||||
if (m_WindowSize > MAX_WINDOW_SIZE) m_WindowSize = MAX_WINDOW_SIZE;
|
if (m_WindowSize > MAX_WINDOW_SIZE) m_WindowSize = MAX_WINDOW_SIZE;
|
||||||
m_WindowIncCounter--;
|
m_WindowIncCounter--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
UpdatePacingTime ();
|
UpdatePacingTime ();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m_IsNAcked)
|
if (m_IsNAcked)
|
||||||
ResendPacket ();
|
ResendPacket ();
|
||||||
else if (m_IsResendNeeded) // resend packets
|
else if (m_IsResendNeeded) // resend packets
|
||||||
|
|
|
@ -203,7 +203,7 @@ namespace client
|
||||||
std::vector<std::shared_ptr<DatagramSessionInfo> > sessions;
|
std::vector<std::shared_ptr<DatagramSessionInfo> > sessions;
|
||||||
std::lock_guard<std::mutex> lock (m_SessionsMutex);
|
std::lock_guard<std::mutex> lock (m_SessionsMutex);
|
||||||
|
|
||||||
for (auto it: m_Sessions)
|
for (const auto &it: m_Sessions)
|
||||||
{
|
{
|
||||||
auto s = it.second;
|
auto s = it.second;
|
||||||
if (!s->m_Destination) continue;
|
if (!s->m_Destination) continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue