mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-18 22:34:54 +09:00
all: use sync.WaitGroup.Go
Drops the Add/Done bookkeeping, which in batcher.go was spread across three functions.
This commit is contained in:
committed by
Kristoffer Dalby
parent
245b81401c
commit
373c60efe3
@@ -85,19 +85,13 @@ func TestSSHCheckAuthConcurrent(t *testing.T) {
|
||||
wg.Wait()
|
||||
|
||||
// Clear concurrently with reads
|
||||
wg.Add(2)
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
wg.Go(func() {
|
||||
s.ClearSSHCheckAuth()
|
||||
}()
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
})
|
||||
|
||||
wg.Go(func() {
|
||||
s.GetLastSSHAuth(types.NodeID(1), types.NodeID(2))
|
||||
}()
|
||||
})
|
||||
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user