Skip to content

Commit

Permalink
Dont close pcap outside of goroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsteele committed Dec 1, 2015
1 parent f522d9e commit 883d0b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func main() {
res[t.SrcPort] = append(res[t.SrcPort], f)
}
}

h.Close()
}()

for i := 0; i < concurrency; i++ {
Expand All @@ -122,7 +124,6 @@ func main() {
time.Sleep(time.Duration(2 * time.Second))
track <- empty{}
close(track)
h.Close()
log.Println("Scan complete.")

services, _ := buildServices()
Expand Down

0 comments on commit 883d0b2

Please sign in to comment.