mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-20 15:31:30 +02:00
Fix close
This commit is contained in:
@@ -122,14 +122,16 @@ func (e *ConnMgr) Close() {
|
||||
}
|
||||
// todo wait for receiveLazyConnEvents to finish
|
||||
e.lazyConnMgr.Close()
|
||||
e.lazyConnMgr = nil
|
||||
}
|
||||
|
||||
func (e *ConnMgr) receiveLazyConnEvents(ctx context.Context) {
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case peerID := <-e.lazyConnMgr.PeerActivityChan:
|
||||
e.peerStore.PeerConnOpen(peerID)
|
||||
case <-ctx.Done():
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user