diff options
author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2015-07-30 11:57:48 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2015-07-30 11:57:48 -0700 |
commit | 6f46f0e0e1f0dd01f0e7bdaa700b11d2c54d0794 (patch) | |
tree | 3e2d42b461a5f205141a6655891669614b023792 /osdep | |
parent | 8169b3548251b6e1cb78fa1c7561469bad4e1692 (diff) | |
download | infinitytier-6f46f0e0e1f0dd01f0e7bdaa700b11d2c54d0794.tar.gz infinitytier-6f46f0e0e1f0dd01f0e7bdaa700b11d2c54d0794.zip |
Because Windows.
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/WindowsEthernetTap.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/osdep/WindowsEthernetTap.cpp b/osdep/WindowsEthernetTap.cpp index d8ba1f98..426dd3cb 100644 --- a/osdep/WindowsEthernetTap.cpp +++ b/osdep/WindowsEthernetTap.cpp @@ -871,15 +871,19 @@ void WindowsEthernetTap::threadMain() try { while (_run) { + // Because Windows + setPersistentTapDeviceState(_deviceInstanceId.c_str(),false); + Sleep(500); + setPersistentTapDeviceState(_deviceInstanceId.c_str(),true); + Sleep(500); + setPersistentTapDeviceState(_deviceInstanceId.c_str(),false); + Sleep(500); setPersistentTapDeviceState(_deviceInstanceId.c_str(),true); Sleep(500); _tap = CreateFileA(tapPath,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_SYSTEM|FILE_FLAG_OVERLAPPED,NULL); if (_tap == INVALID_HANDLE_VALUE) { - setPersistentTapDeviceState(_deviceInstanceId.c_str(),false); - Sleep(500); - setPersistentTapDeviceState(_deviceInstanceId.c_str(),true); - Sleep(500); + Sleep(1000); continue; } |