mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: fixed a race condition
This commit is contained in:
parent
e5f598b274
commit
ec28d73ba7
4 changed files with 32 additions and 38 deletions
|
@ -19,9 +19,9 @@ func (p *Prober) sendProbeUDP(from net.IP, from_hw net.HardwareAddr, ip net.IP)
|
|||
wrote, _ := con.Write([]byte{0x00})
|
||||
|
||||
if wrote > 0 {
|
||||
p.Session.Queue.Stats.Lock()
|
||||
p.Session.Queue.Stats.Sent += uint64(wrote)
|
||||
p.Session.Queue.Stats.Unlock()
|
||||
p.Session.Queue.TrackSent(uint64(wrote))
|
||||
} else {
|
||||
p.Session.Queue.TrackError()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue