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