Compare commits

..

No commits in common. "ec67f48d855c196669938a2da71064da8a501d4b" and "43939cedf4aa0ba2db17b96ba424f132daf9f079" have entirely different histories.

3 changed files with 6 additions and 6 deletions

View file

@ -1822,7 +1822,7 @@ namespace transport
LogPrint(eLogError, "NTCP2: HTTP proxy write error ", ec.message()); LogPrint(eLogError, "NTCP2: HTTP proxy write error ", ec.message());
}); });
auto readbuff = std::make_shared<boost::asio::streambuf>(); boost::asio::streambuf * readbuff = new 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,6 +1842,7 @@ namespace transport
{ {
timer->cancel(); timer->cancel();
conn->ClientLogin(); conn->ClientLogin();
delete readbuff;
return; return;
} }
else else
@ -1851,6 +1852,7 @@ 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;

View file

@ -1277,12 +1277,10 @@ 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

View file

@ -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 (const auto &it: m_Sessions) for (auto it: m_Sessions)
{ {
auto s = it.second; auto s = it.second;
if (!s->m_Destination) continue; if (!s->m_Destination) continue;