mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-03 03:59:07 +02:00
No lock no copy
This commit is contained in:
@@ -58,9 +58,8 @@ func (s *Server) onMDMPolicyChange(_, curr *mdm.Policy) {
|
|||||||
// every exit path (ctx cancel, DisableAutoConnect single-shot,
|
// every exit path (ctx cancel, DisableAutoConnect single-shot,
|
||||||
// backoff exhausted, panic) — see the defer in server.go.
|
// backoff exhausted, panic) — see the defer in server.go.
|
||||||
if s.clientGiveUpChan != nil {
|
if s.clientGiveUpChan != nil {
|
||||||
giveUpChan := s.clientGiveUpChan
|
|
||||||
select {
|
select {
|
||||||
case <-giveUpChan:
|
case <-s.clientGiveUpChan:
|
||||||
case <-time.After(5 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
log.Warn("MDM restart: timeout waiting for previous engine goroutine; proceeding anyway")
|
log.Warn("MDM restart: timeout waiting for previous engine goroutine; proceeding anyway")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user