PCAP: Don't use pthread_cancel on Linux

It is not necessary and can cause a crash in libunwind
v0.3.0-dev
Paul Hollinsky 2021-12-08 14:30:02 -05:00
parent d5087c1ba5
commit 96f18dcfd6
1 changed files with 2 additions and 0 deletions

View File

@ -259,7 +259,9 @@ bool PCAP::close() {
closing = true; // Signal the threads that we are closing closing = true; // Signal the threads that we are closing
pcap_breakloop(iface.fp); pcap_breakloop(iface.fp);
#ifndef __linux__
pthread_cancel(readThread.native_handle()); pthread_cancel(readThread.native_handle());
#endif
readThread.join(); readThread.join();
writeThread.join(); writeThread.join();
closing = false; closing = false;