mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Thread sync bug...
This commit is contained in:
parent
5bb854e504
commit
f65b48d447
1 changed files with 6 additions and 12 deletions
|
@ -69,18 +69,12 @@ void TestEthernetTapFactory::close(EthernetTap *tap,bool destroyPersistentDevice
|
||||||
if (!tap)
|
if (!tap)
|
||||||
return;
|
return;
|
||||||
SharedPtr<TestEthernetTap> tapp((TestEthernetTap *)tap);
|
SharedPtr<TestEthernetTap> tapp((TestEthernetTap *)tap);
|
||||||
{
|
Mutex::Lock _l1(_taps_m);
|
||||||
Mutex::Lock _l(_taps_m);
|
Mutex::Lock _l2(_tapsByMac_m);
|
||||||
_taps.erase(tapp);
|
Mutex::Lock _l3(_tapsByNwid_m);
|
||||||
}
|
_taps.erase(tapp);
|
||||||
{
|
_tapsByMac.erase(tapp->mac());
|
||||||
Mutex::Lock _l(_tapsByMac_m);
|
_tapsByNwid.erase(tapp->nwid());
|
||||||
_tapsByMac.erase(tapp->mac());
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Mutex::Lock _l(_tapsByNwid_m);
|
|
||||||
_tapsByNwid.erase(tapp->nwid());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ZeroTier
|
} // namespace ZeroTier
|
||||||
|
|
Loading…
Add table
Reference in a new issue