Make EthernetTap creation occur in a background thread in Network since it's a time consuming operation on Windows. This fixes one of the last remaining Windows problems.
This commit is contained in:
@@ -90,11 +90,6 @@ public:
|
||||
return nwlist;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call whack() on all networks' tap devices
|
||||
*/
|
||||
void whackAllTaps();
|
||||
|
||||
/**
|
||||
* Perform cleanup and possibly update saved state
|
||||
*/
|
||||
@@ -117,8 +112,11 @@ public:
|
||||
{
|
||||
std::set<std::string> tapDevs;
|
||||
Mutex::Lock _l(_networks_m);
|
||||
for(std::map< uint64_t,SharedPtr<Network> >::const_iterator n(_networks.begin());n!=_networks.end();++n)
|
||||
tapDevs.insert(n->second->tap().deviceName());
|
||||
for(std::map< uint64_t,SharedPtr<Network> >::const_iterator n(_networks.begin());n!=_networks.end();++n) {
|
||||
std::string dn(n->second->tapDeviceName());
|
||||
if (dn.length())
|
||||
tapDevs.insert(dn);
|
||||
}
|
||||
return tapDevs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user