1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Replace std::list<session_t> in networking code (#10215)

This commit is contained in:
sfan5 2020-07-23 19:47:58 +02:00 committed by GitHub
parent 76afde861d
commit 8ca602150d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 18 deletions

View file

@ -1269,7 +1269,8 @@ bool Connection::deletePeer(session_t peer_id, bool timeout)
return false;
peer = m_peers[peer_id];
m_peers.erase(peer_id);
m_peer_ids.remove(peer_id);
auto it = std::find(m_peer_ids.begin(), m_peer_ids.end(), peer_id);
m_peer_ids.erase(it);
}
Address peer_address;