Commit 1e10d28b authored by Dirk McCormick's avatar Dirk McCormick

refactor: remove extraneous go routine

parent e9661edc
......@@ -119,15 +119,9 @@ func (sm *SessionManager) ReceiveFrom(from peer.ID, ks []cid.Cid) {
sm.sessLk.Lock()
defer sm.sessLk.Unlock()
var wg sync.WaitGroup
for _, s := range sm.sessions {
wg.Add(1)
go func() {
defer wg.Done()
s.session.ReceiveFrom(from, ks)
}()
s.session.ReceiveFrom(from, ks)
}
wg.Wait()
}
// IsWanted indicates whether any of the sessions are waiting to receive
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment