mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 13:42:10 +02:00
HTTPServer: generate sequential Ids for each newly accepted connection
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
@@ -1008,4 +1008,9 @@ std::unique_ptr<Sock> HTTPServer::AcceptConnection(const Sock& listen_sock, CSer
|
||||
|
||||
return sock;
|
||||
}
|
||||
|
||||
HTTPServer::Id HTTPServer::GetNewId()
|
||||
{
|
||||
return m_next_id.fetch_add(1, std::memory_order_relaxed);
|
||||
}
|
||||
} // namespace http_bitcoin
|
||||
|
||||
Reference in New Issue
Block a user