diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-01-27 23:13:36 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-01-27 23:13:36 -0800 |
| commit | f80ec871f6f4c63a28b9b8192477114b7aac696d (patch) | |
| tree | b2b02a40d9d9e0ee9f0dd0478fe192e966e274bc /node/NodeConfig.hpp | |
| parent | e0cb5caef21243cf045cecc25ed064869d1594d4 (diff) | |
| download | infinitytier-f80ec871f6f4c63a28b9b8192477114b7aac696d.tar.gz infinitytier-f80ec871f6f4c63a28b9b8192477114b7aac696d.zip | |
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.
Diffstat (limited to 'node/NodeConfig.hpp')
| -rw-r--r-- | node/NodeConfig.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/node/NodeConfig.hpp b/node/NodeConfig.hpp index 2612cf6a..b26d180b 100644 --- a/node/NodeConfig.hpp +++ b/node/NodeConfig.hpp @@ -91,11 +91,6 @@ public: } /** - * Call whack() on all networks' tap devices - */ - void whackAllTaps(); - - /** * Perform cleanup and possibly update saved state */ void clean(); @@ -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; } |
