mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
ae81bb8606
commit
ea477ef2b4
4 changed files with 38 additions and 45 deletions
|
@ -3,6 +3,7 @@ package modules
|
|||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/evilsocket/bettercap-ng/log"
|
||||
)
|
||||
|
@ -19,9 +20,7 @@ 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.Lock()
|
||||
p.Session.Queue.Sent += uint64(wrote)
|
||||
p.Session.Queue.Unlock()
|
||||
atomic.AddUint64(&p.Session.Queue.Stats.Sent, uint64(wrote))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue