mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-20 08:03:53 +00:00
Fix leaving of networks to actually call Network::destroy().
This commit is contained in:
@ -316,6 +316,7 @@ ZT1_ResultCode Node::leave(uint64_t nwid)
|
|||||||
for(std::vector< std::pair< uint64_t,SharedPtr<Network> > >::const_iterator n(_networks.begin());n!=_networks.end();++n) {
|
for(std::vector< std::pair< uint64_t,SharedPtr<Network> > >::const_iterator n(_networks.begin());n!=_networks.end();++n) {
|
||||||
if (n->first != nwid)
|
if (n->first != nwid)
|
||||||
newn.push_back(*n);
|
newn.push_back(*n);
|
||||||
|
else n->second->destroy();
|
||||||
}
|
}
|
||||||
_networks.swap(newn);
|
_networks.swap(newn);
|
||||||
return ZT1_RESULT_OK;
|
return ZT1_RESULT_OK;
|
||||||
|
@ -252,4 +252,3 @@ private:
|
|||||||
} // namespace ZeroTier
|
} // namespace ZeroTier
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user