diff --git a/src/source-pcap.c b/src/source-pcap.c index 7bf537d142..0843322ef8 100644 --- a/src/source-pcap.c +++ b/src/source-pcap.c @@ -287,6 +287,9 @@ TmEcode ReceivePcapLoop(ThreadVars *tv, void *data, void *slot) int dbreak = 0; SCLogError(SC_ERR_PCAP_DISPATCH, "error code %" PRId32 " %s", r, pcap_geterr(ptv->pcap_handle)); + if (r == PCAP_ERROR_BREAK) { + SCReturnInt(ptv->cb_result); + } do { usleep(PCAP_RECONNECT_TIMEOUT); if (suricata_ctl_flags != 0) {