POSIX: PCAP: Cancel after pcap_breakloop() to EINTR out of poll()
This is necessary as pcap_breakloop() does not actually wake the thread from blocking operations, such as poll.pull/35/head
parent
b340d167dc
commit
19aabdfacf
|
|
@ -234,6 +234,7 @@ bool PCAP::close() {
|
|||
|
||||
closing = true; // Signal the threads that we are closing
|
||||
pcap_breakloop(interface.fp);
|
||||
pthread_cancel(readThread.native_handle());
|
||||
readThread.join();
|
||||
writeThread.join();
|
||||
closing = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue