fix link panic
This commit is contained in:
parent
dab0f3223f
commit
cf593e7c50
@ -225,10 +225,11 @@ func (t *tun) monitor() {
|
|||||||
t.Lock()
|
t.Lock()
|
||||||
for _, node := range delLinks {
|
for _, node := range delLinks {
|
||||||
log.Debugf("Tunnel deleting dead link for %s", node)
|
log.Debugf("Tunnel deleting dead link for %s", node)
|
||||||
link := t.links[node]
|
if link, ok := t.links[node]; ok {
|
||||||
link.Close()
|
link.Close()
|
||||||
delete(t.links, node)
|
delete(t.links, node)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
t.Unlock()
|
t.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user