Skip to content

Commit

Permalink
temporary disable RelayRespond resend from Bob because it might be no…
Browse files Browse the repository at this point in the history
…t acked
  • Loading branch information
orignal committed Oct 4, 2024
1 parent 4436c49 commit 58245bf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions libi2pd/SSU2Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,7 @@ namespace transport
packet->payloadSize += CreatePaddingBlock (packet->payload + packet->payloadSize, m_MaxPayloadSize - packet->payloadSize);
uint32_t packetNum = session->SendData (packet->payload, packet->payloadSize);
packet->sendTime = mts;
// Charlie always responds with RelayResponse
session->m_SentPackets.emplace (packetNum, packet);
}

Expand Down Expand Up @@ -2068,8 +2069,8 @@ namespace transport
code, bufbe32toh (buf + 33), token, isV4);
packet->payloadSize += CreatePaddingBlock (packet->payload + packet->payloadSize, m_MaxPayloadSize - packet->payloadSize);
/*uint32_t packetNum = */SendData (packet->payload, packet->payloadSize);
// for some reason Bob never ack this RelayResponse
// TODO: unccomend line below once the problem is resolved
// sometimes Bob doesn't ack this RelayResponse
// TODO: uncomment line below once the problem is resolved
//packet->sendTime = mts;
//m_SentPackets.emplace (packetNum, packet);
}
Expand Down Expand Up @@ -2106,9 +2107,11 @@ namespace transport
memcpy (payload + 3, buf, len); // forward to Alice as is
packet->payloadSize = len + 3;
packet->payloadSize += CreatePaddingBlock (payload + packet->payloadSize, m_MaxPayloadSize - packet->payloadSize);
uint32_t packetNum = it->second.first->SendData (packet->payload, packet->payloadSize);
packet->sendTime = i2p::util::GetMillisecondsSinceEpoch ();
it->second.first->m_SentPackets.emplace (packetNum, packet);
/*uint32_t packetNum = */it->second.first->SendData (packet->payload, packet->payloadSize);
// sometimes Alice doesn't ack this RelayResponse
// TODO: uncomment line below once the problem is resolved
//packet->sendTime = i2p::util::GetMillisecondsSinceEpoch ();
//it->second.first->m_SentPackets.emplace (packetNum, packet);
}
else
{
Expand Down

0 comments on commit 58245bf

Please sign in to comment.