use std::set

pull/350/head
Jeff Becker 5 years ago
parent 89a8c9248d
commit 88f988d142
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -509,7 +509,7 @@ namespace llarp
static_cast< async_verify_context * >(job->user);
auto router = ctx->router;
PubKey pk(job->rc.pubkey);
router->m_ClientRCs[pk] = job->rc;
router->m_Clients.insert(pk);
router->FlushOutboundFor(pk, router->GetLinkWithSessionByPubkey(pk));
delete ctx;
router->pendingVerifyRC.erase(pk);
@ -1053,7 +1053,7 @@ namespace llarp
LogDebug("keepalive to ", itr->first);
link->KeepAliveSessionTo(itr->first);
}
else if(m_ClientRCs.count(itr->first) == 0)
else if(m_Clients.count(itr->first) == 0)
{
LogDebug("establish to ", itr->first);
TryEstablishTo(itr->first);
@ -1152,7 +1152,7 @@ namespace llarp
dht()->impl->Nodes()->DelNode(k);
// remove from valid routers if it's a valid router
validRouters.erase(remote);
m_ClientRCs.erase(remote);
m_Clients.erase(remote);
LogInfo("Session to ", remote, " fully closed");
}

@ -310,7 +310,7 @@ namespace llarp
m_PersistingSessions;
// RCs of connected clients
std::unordered_map< RouterID, RouterContact, RouterID::Hash > m_ClientRCs;
std::set< RouterID > m_Clients;
// lokinet routers from lokid, maps pubkey to when we think it will expire,
// set to max value right now

Loading…
Cancel
Save