node: use thread local random device

This commit is contained in:
Adrien Béraud committed 2018-02-24 14:30:40 -05:00
1 parent 8cce9fcb85
commit 6821988ddf
1 file changed
+1 -2
+1 -2
View File
@@ -30,11 +30,10 @@ constexpr std::chrono::minutes Node::NODE_EXPIRE_TIME;
constexpr std::chrono::minutes Node::NODE_GOOD_TIME;
constexpr std::chrono::seconds Node::MAX_RESPONSE_TIME;
Node::Node(const InfoHash& id, const SockAddr& addr, bool client)
: id(id), addr(addr), is_client(client), sockets_()
{
crypto::random_device rd;
thread_local crypto::random_device rd {};
transaction_id = std::uniform_int_distribution<Tid>{1}(rd);
}