From 2c4eb80595f9e6bbb6259c8182cbd96716003f10 Mon Sep 17 00:00:00 2001 From: Josh Deprez Date: Sun, 7 Apr 2024 12:58:47 +1000 Subject: [PATCH] Investigating ^C behaviour --- atalk/raw.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atalk/raw.go b/atalk/raw.go index 6ec3f19..a7de7aa 100644 --- a/atalk/raw.go +++ b/atalk/raw.go @@ -2,13 +2,14 @@ package atalk import ( "fmt" + "time" "github.com/google/gopacket/pcap" ) // StartPcap opens an AppleTalk and AARP listening session on a network device. func StartPcap(device string) (*pcap.Handle, error) { - handle, err := pcap.OpenLive(device, 4096, true, pcap.BlockForever) + handle, err := pcap.OpenLive(device, 4096, true, 100*time.Millisecond) if err != nil { return nil, fmt.Errorf("opening device %q: %w", device, err) }