diff --git a/lib/bettercap/network/packet_queue.rb b/lib/bettercap/network/packet_queue.rb index f35a6322..72b98379 100644 --- a/lib/bettercap/network/packet_queue.rb +++ b/lib/bettercap/network/packet_queue.rb @@ -49,7 +49,7 @@ def wait_empty( timeout ) # Notify the queue to stop and wait for every worker to finish. def stop - wait_empty( 60 ) + wait_empty( 6000 ) @running = false @nworkers.times { push(nil) } @workers.map(&:join) diff --git a/lib/bettercap/spoofers/arp.rb b/lib/bettercap/spoofers/arp.rb index a7ac785a..eecfed6e 100644 --- a/lib/bettercap/spoofers/arp.rb +++ b/lib/bettercap/spoofers/arp.rb @@ -67,8 +67,6 @@ def stop raise 'ARP spoofer is not running' unless @running Logger.debug 'Stopping ARP spoofer ...' - Logger.debug "Resetting packet forwarding to #{@forwarding} ..." - @ctx.firewall.enable_forwarding( @forwarding ) @running = false begin @@ -86,6 +84,10 @@ def stop end end end + + Logger.debug "Resetting packet forwarding to #{@forwarding} ..." + + @ctx.firewall.enable_forwarding( @forwarding ) end private