|
|
|
@ -243,9 +243,6 @@ namespace datagram
@@ -243,9 +243,6 @@ namespace datagram
|
|
|
|
|
if (sz) { |
|
|
|
|
auto idx = rand() % sz; |
|
|
|
|
m_CurrentRemoteLease = ls[idx]; |
|
|
|
|
} else { |
|
|
|
|
// no more leases, bail
|
|
|
|
|
LogPrint(eLogWarning, "DatagramSession: no more valid remote leases to ", m_RemoteIdent.ToBase32()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// no remote lease set?
|
|
|
|
@ -293,6 +290,7 @@ namespace datagram
@@ -293,6 +290,7 @@ namespace datagram
|
|
|
|
|
|
|
|
|
|
void DatagramSession::HandleLeaseSetUpdated(std::shared_ptr<i2p::data::LeaseSet> ls) |
|
|
|
|
{ |
|
|
|
|
if(!ls) return; |
|
|
|
|
// only update lease set if found and newer than previous lease set
|
|
|
|
|
uint64_t oldExpire = 0; |
|
|
|
|
if(m_RemoteLeaseSet) oldExpire = m_RemoteLeaseSet->GetExpirationTime(); |
|
|
|
|