mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-17 22:29:54 +00:00
Check nil on Stop
Co-authored-by: hakansa <43675540+hakansa@users.noreply.github.com>
This commit is contained in:
@@ -489,6 +489,9 @@ func (w *Watcher) Stop() {
|
||||
|
||||
w.cancel()
|
||||
|
||||
if w.currentChosen == nil {
|
||||
return
|
||||
}
|
||||
if err := w.removeAllowedIPs(w.currentChosen, reasonShutdown); err != nil {
|
||||
log.Errorf("Failed to remove routes for [%v]: %v", w.handler, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user