fix link panic

This commit is contained in:
Asim Aslam 2019-10-31 17:22:38 +00:00
parent dab0f3223f
commit cf593e7c50

View File

@ -225,10 +225,11 @@ func (t *tun) monitor() {
t.Lock()
for _, node := range delLinks {
log.Debugf("Tunnel deleting dead link for %s", node)
link := t.links[node]
if link, ok := t.links[node]; ok {
link.Close()
delete(t.links, node)
}
}
t.Unlock()
}