inovex / mqtt-stresser

Load testing tool to stress MQTT message broker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why sleep two rampUpDelay interval?

yanggeorge opened this issue · comments

time.Sleep(rampUpDelay).    // <-- here is first 
select {
case <-time.NewTimer(rampUpDelay).C:       // <-- here is second
case s := <-signalChan:
fmt.Printf("Got signal %s. Cancel test.\n", s.String())
cancelFunc()
stopStartLoop = true
}

why need two ?

I think that is a bug. The first one can be deleted. After having a look at the git history, I think I missed the first sleep while doing a refactoring of that code.