diff --git a/modules/net_recon.go b/modules/net_recon.go index 5410fd22..5a3c4e05 100644 --- a/modules/net_recon.go +++ b/modules/net_recon.go @@ -183,7 +183,9 @@ func (p ProtoPairList) Swap(i, j int) { p[i], p[j] = p[j], p[i] } func (d *Discovery) Show() error { d.Session.Targets.Lock() + d.Session.Queue.Lock() defer d.Session.Targets.Unlock() + defer d.Session.Queue.Unlock() iface := d.Session.Interface gw := d.Session.Gateway diff --git a/packets/queue.go b/packets/queue.go index 52b8a55a..0413e07f 100644 --- a/packets/queue.go +++ b/packets/queue.go @@ -151,6 +151,14 @@ func (q *Queue) Send(raw []byte) error { } } +func (q *Queue) Lock() { + q.lock.Lock() +} + +func (q *Queue) Unlock() { + q.lock.Unlock() +} + func (q *Queue) Stop() { q.lock.Lock() defer q.lock.Unlock()