Browse Source

fixed race condition

pull/603/head
orignal 8 years ago committed by GitHub
parent
commit
8e835f2f6b
  1. 3
      RouterInfo.cpp

3
RouterInfo.cpp

@ -752,7 +752,8 @@ namespace data
std::shared_ptr<const RouterInfo::Address> RouterInfo::GetAddress (TransportStyle s, bool v4only, bool v6only) const std::shared_ptr<const RouterInfo::Address> RouterInfo::GetAddress (TransportStyle s, bool v4only, bool v6only) const
{ {
for (const auto& address : *m_Addresses) auto addresses = m_Addresses;
for (const auto& address : *addresses)
{ {
if (address->transportStyle == s) if (address->transportStyle == s)
{ {

Loading…
Cancel
Save