Changed flag name from threads to concurrency

This commit is contained in:
David J. Allen 2024-05-10 10:10:21 -06:00
parent 9663b677ba
commit a2b841b401
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC

View file

@ -39,7 +39,7 @@ type QueryParams struct {
User string User string
Pass string Pass string
Drivers []string Drivers []string
Threads int Concurrency int
Preferred string Preferred string
Timeout int Timeout int
CaCertPath string CaCertPath string
@ -71,14 +71,14 @@ func CollectAll(probeStates *[]ScannedResult, l *log.Logger, q *QueryParams) err
offset = 0 offset = 0
wg sync.WaitGroup wg sync.WaitGroup
found = make([]string, 0, len(*probeStates)) found = make([]string, 0, len(*probeStates))
done = make(chan struct{}, q.Threads+1) done = make(chan struct{}, q.Concurrency+1)
chanProbeState = make(chan ScannedResult, q.Threads+1) chanProbeState = make(chan ScannedResult, q.Concurrency+1)
client = smd.NewClient( client = smd.NewClient(
smd.WithSecureTLS(q.CaCertPath), smd.WithSecureTLS(q.CaCertPath),
) )
) )
wg.Add(q.Threads) wg.Add(q.Concurrency)
for i := 0; i < q.Threads; i++ { for i := 0; i < q.Concurrency; i++ {
go func() { go func() {
for { for {
ps, ok := <-chanProbeState ps, ok := <-chanProbeState