mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 12:06:55 +02:00
Possible fix for Linux deadlock.
This commit is contained in:
parent
c2eeb5d553
commit
21993819a5
1 changed files with 4 additions and 4 deletions
|
@ -327,14 +327,14 @@ LinuxEthernetTap::~LinuxEthernetTap()
|
|||
(void)::write(_shutdownSignalPipe[1],"\0",1); // causes reader thread(s) to exit
|
||||
_tapq.post(std::pair<void *,int>(nullptr,0)); // causes processor thread to exit
|
||||
|
||||
::close(_fd);
|
||||
::close(_shutdownSignalPipe[0]);
|
||||
::close(_shutdownSignalPipe[1]);
|
||||
|
||||
_tapReaderThread[0].join();
|
||||
_tapReaderThread[1].join();
|
||||
_tapProcessorThread.join();
|
||||
|
||||
::close(_fd);
|
||||
::close(_shutdownSignalPipe[0]);
|
||||
::close(_shutdownSignalPipe[1]);
|
||||
|
||||
for(std::vector<void *>::iterator i(_buffers.begin());i!=_buffers.end();++i)
|
||||
free(*i);
|
||||
std::vector< std::pair<void *,int> > dv(_tapq.drain());
|
||||
|
|
Loading…
Add table
Reference in a new issue