Skip to content

Commit

Permalink
fix -c conditions and bump version to 0.11.8
Browse files Browse the repository at this point in the history
  • Loading branch information
willyrgf committed Jan 13, 2019
1 parent a1aec22 commit e0bdd47
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions go-radius-gen-acct.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (cfg *Config) CliCreate() {
app := cli.NewApp()
app.Usage = "A Go (golang) RADIUS client accounting (RFC 2866) implementation for perfomance testing"
app.UsageText = "go-radius-gen-acct - A Go (golang) RADIUS client accounting (RFC 2866) implementation for perfomance testing with generated data according dictionary (./dictionary.routecall.opensips) and RFC2866 (./rfc2866)."
app.Version = "0.11.7"
app.Version = "0.11.8"
app.Compiled = time.Now()

app.Flags = []cli.Flag{
Expand Down Expand Up @@ -233,21 +233,17 @@ func main() {
log.Print("daemon started")
}

wg.Add(1)
if cfg.ShowCount {
LogStats(&wg, cfg, &countTotal)
wg.Add(1)
go LogStats(&wg, cfg, &countTotal)
}

for i := 0; i < cfg.MaxReq; i++ {
_ = rl.Take()
wg.Add(1)
go func() {
defer wg.Done()
// -c count option
// I hope the compiler solve this if
if cfg.ShowCount {
atomic.AddUint64(&countTotal, 1)
}
atomic.AddUint64(&countTotal, 1)
c := cdr.FillCdr()
SendAcct(c, cfg)
}()
Expand Down

0 comments on commit e0bdd47

Please sign in to comment.