mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
Fixed #931. don't insert null pointer into DHkeys list
This commit is contained in:
parent
1607535416
commit
028f0bdb8d
@ -102,9 +102,14 @@ namespace transport
|
||||
|
||||
void DHKeysPairSupplier::Return (std::shared_ptr<i2p::crypto::DHKeys> pair)
|
||||
{
|
||||
std::unique_lock<std::mutex>l(m_AcquiredMutex);
|
||||
if ((int)m_Queue.size () < 2*m_QueueSize)
|
||||
m_Queue.push (pair);
|
||||
if (pair)
|
||||
{
|
||||
std::unique_lock<std::mutex>l(m_AcquiredMutex);
|
||||
if ((int)m_Queue.size () < 2*m_QueueSize)
|
||||
m_Queue.push (pair);
|
||||
}
|
||||
else
|
||||
LogPrint(eLogError, "Transports: return null DHKeys");
|
||||
}
|
||||
|
||||
Transports transports;
|
||||
|
Loading…
Reference in New Issue
Block a user