mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
set session request sent status in right place
This commit is contained in:
parent
ed04747b9d
commit
aaad6dece6
|
@ -420,11 +420,13 @@ namespace transport
|
||||||
header.ll[1] ^= CreateHeaderMask (m_Address->i, payload + (payloadSize - 12));
|
header.ll[1] ^= CreateHeaderMask (m_Address->i, payload + (payloadSize - 12));
|
||||||
i2p::crypto::ChaCha20 (headerX, 48, m_Address->i, nonce, headerX);
|
i2p::crypto::ChaCha20 (headerX, 48, m_Address->i, nonce, headerX);
|
||||||
m_NoiseState->MixHash (payload, payloadSize); // h = SHA256(h || encrypted payload from Session Request) for SessionCreated
|
m_NoiseState->MixHash (payload, payloadSize); // h = SHA256(h || encrypted payload from Session Request) for SessionCreated
|
||||||
m_State = eSSU2SessionStateSessionRequestSent;
|
|
||||||
m_SentHandshakePacket->payloadSize = payloadSize;
|
m_SentHandshakePacket->payloadSize = payloadSize;
|
||||||
// send
|
// send
|
||||||
if (m_State == eSSU2SessionStateTokenReceived || m_Server.AddPendingOutgoingSession (shared_from_this ()))
|
if (m_State == eSSU2SessionStateTokenReceived || m_Server.AddPendingOutgoingSession (shared_from_this ()))
|
||||||
|
{
|
||||||
|
m_State = eSSU2SessionStateSessionRequestSent;
|
||||||
m_Server.Send (header.buf, 16, headerX, 48, payload, payloadSize, m_RemoteEndpoint);
|
m_Server.Send (header.buf, 16, headerX, 48, payload, payloadSize, m_RemoteEndpoint);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "SSU2: SessionRequest request to ", m_RemoteEndpoint, " already pending");
|
LogPrint (eLogWarning, "SSU2: SessionRequest request to ", m_RemoteEndpoint, " already pending");
|
||||||
|
|
Loading…
Reference in a new issue