We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4ef41f commit d4e0b6aCopy full SHA for d4e0b6a
p2p/net/swarm/swarm.go
@@ -541,18 +541,10 @@ func (s *Swarm) Backoff() *DialBackoff {
541
542
// notifyAll sends a signal to all Notifiees
543
func (s *Swarm) notifyAll(notify func(network.Notifiee)) {
544
- var wg sync.WaitGroup
545
-
546
s.notifs.RLock()
547
- wg.Add(len(s.notifs.m))
548
for f := range s.notifs.m {
549
- go func(f network.Notifiee) {
550
- defer wg.Done()
551
- notify(f)
552
- }(f)
+ notify(f)
553
}
554
555
- wg.Wait()
556
s.notifs.RUnlock()
557
558
0 commit comments