misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-11 21:07:16 +01:00
commit 3182896cb5

View file

@ -88,6 +88,7 @@ func (p *Prober) Start() error {
from := p.Session.Interface.IP from := p.Session.Interface.IP
from_hw := p.Session.Interface.HW from_hw := p.Session.Interface.HW
addresses := list.Expand() addresses := list.Expand()
throttle := time.Duration(p.throttle) * time.Millisecond
for p.Running() { for p.Running() {
for _, ip := range addresses { for _, ip := range addresses {
@ -98,9 +99,7 @@ func (p *Prober) Start() error {
p.sendProbe(from, from_hw, ip) p.sendProbe(from, from_hw, ip)
if p.throttle > 0 { time.Sleep(throttle)
time.Sleep(time.Duration(p.throttle) * time.Millisecond)
}
} }
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)