mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
PCAP: Don't use pthread_cancel on Linux
It is not necessary and can cause a crash in libunwind
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user