mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-02 19:26:41 +00:00
move CoUninitialize to the proper place at the end of the tap thread
This commit is contained in:
parent
a9e4fb0ed9
commit
95da2bcbcf
@ -648,7 +648,6 @@ WindowsEthernetTap::WindowsEthernetTap(
|
|||||||
WindowsEthernetTap::~WindowsEthernetTap()
|
WindowsEthernetTap::~WindowsEthernetTap()
|
||||||
{
|
{
|
||||||
WinDNSHelper::removeDNS(_nwid);
|
WinDNSHelper::removeDNS(_nwid);
|
||||||
CoUninitialize();
|
|
||||||
_run = false;
|
_run = false;
|
||||||
ReleaseSemaphore(_injectSemaphore,1,NULL);
|
ReleaseSemaphore(_injectSemaphore,1,NULL);
|
||||||
Thread::join(_thread);
|
Thread::join(_thread);
|
||||||
@ -1171,6 +1170,7 @@ void WindowsEthernetTap::threadMain()
|
|||||||
// We will restart and re-open the tap unless _run == false
|
// We will restart and re-open the tap unless _run == false
|
||||||
}
|
}
|
||||||
} catch ( ... ) {} // catch unexpected exceptions -- this should not happen but would prevent program crash or other weird issues since threads should not throw
|
} catch ( ... ) {} // catch unexpected exceptions -- this should not happen but would prevent program crash or other weird issues since threads should not throw
|
||||||
|
CoUninitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
NET_IFINDEX WindowsEthernetTap::_getDeviceIndex()
|
NET_IFINDEX WindowsEthernetTap::_getDeviceIndex()
|
||||||
|
Loading…
Reference in New Issue
Block a user