Browse Source

limit number of precalculated DH pairs

pull/660/merge
orignal 8 years ago
parent
commit
4d2f26b1cd
  1. 3
      Transports.cpp

3
Transports.cpp

@ -101,7 +101,8 @@ namespace transport @@ -101,7 +101,8 @@ namespace transport
void DHKeysPairSupplier::Return (std::shared_ptr<i2p::crypto::DHKeys> pair)
{
std::unique_lock<std::mutex> l(m_AcquiredMutex);
std::unique_lock<std::mutex>l(m_AcquiredMutex);
if ((int)m_Queue.size () < 2*m_QueueSize)
m_Queue.push (pair);
}

Loading…
Cancel
Save