mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
Compare commits
3 Commits
f9a67e1b1b
...
d78146f8ff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d78146f8ff | ||
|
|
e8f5efd156 | ||
|
|
ff0b6a6a6a |
@@ -1042,7 +1042,7 @@ namespace transport
|
|||||||
// if still testing or unknown, repeat peer test
|
// if still testing or unknown, repeat peer test
|
||||||
if (ipv4Testing || ipv6Testing)
|
if (ipv4Testing || ipv6Testing)
|
||||||
PeerTest (ipv4Testing, ipv6Testing);
|
PeerTest (ipv4Testing, ipv6Testing);
|
||||||
m_PeerCleanupTimer->expires_from_now (boost::posix_time::seconds(3 * SESSION_CREATION_TIMEOUT));
|
m_PeerCleanupTimer->expires_from_now (boost::posix_time::seconds(2 * SESSION_CREATION_TIMEOUT + m_Rng() % SESSION_CREATION_TIMEOUT));
|
||||||
m_PeerCleanupTimer->async_wait (std::bind (&Transports::HandlePeerCleanupTimer, this, std::placeholders::_1));
|
m_PeerCleanupTimer->async_wait (std::bind (&Transports::HandlePeerCleanupTimer, this, std::placeholders::_1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,22 +300,28 @@ namespace tunnel
|
|||||||
void OutboundTunnel::SendTunnelDataMsgTo (const uint8_t * gwHash, uint32_t gwTunnel, std::shared_ptr<i2p::I2NPMessage> msg)
|
void OutboundTunnel::SendTunnelDataMsgTo (const uint8_t * gwHash, uint32_t gwTunnel, std::shared_ptr<i2p::I2NPMessage> msg)
|
||||||
{
|
{
|
||||||
TunnelMessageBlock block;
|
TunnelMessageBlock block;
|
||||||
|
block.tunnelID = 0; // Initialize tunnelID to a default value
|
||||||
|
|
||||||
if (gwHash)
|
if (gwHash)
|
||||||
{
|
{
|
||||||
block.hash = gwHash;
|
block.hash = gwHash;
|
||||||
if (gwTunnel)
|
if (gwTunnel)
|
||||||
{
|
{
|
||||||
block.deliveryType = eDeliveryTypeTunnel;
|
block.deliveryType = eDeliveryTypeTunnel;
|
||||||
block.tunnelID = gwTunnel;
|
block.tunnelID = gwTunnel; // Set tunnelID only if gwTunnel is non-zero
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
block.deliveryType = eDeliveryTypeRouter;
|
block.deliveryType = eDeliveryTypeRouter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
block.deliveryType = eDeliveryTypeLocal;
|
block.deliveryType = eDeliveryTypeLocal;
|
||||||
block.data = msg;
|
}
|
||||||
|
|
||||||
SendTunnelDataMsgs ({block});
|
block.data = msg;
|
||||||
|
SendTunnelDataMsgs({block});
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutboundTunnel::SendTunnelDataMsgs (const std::vector<TunnelMessageBlock>& msgs)
|
void OutboundTunnel::SendTunnelDataMsgs (const std::vector<TunnelMessageBlock>& msgs)
|
||||||
|
|||||||
Reference in New Issue
Block a user