Stop sniffer first and then stop the remaining threads.