mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-12-22 17:35:39 +00:00
* Don't panic when connect returns `nil` (fixes #1086) It isn't clear to me why this would happen but let's guard the condition anyway. * Log inconsistent error state --------- Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
93a5adfd18
commit
0346af46da
@ -273,7 +273,10 @@ func (l *links) add(u *url.URL, sintf string, linkType linkType) error {
|
||||
}
|
||||
|
||||
conn, err := l.connect(state.ctx, u, info, options)
|
||||
if err != nil {
|
||||
if err != nil || conn == nil {
|
||||
if err == nil && conn == nil {
|
||||
l.core.log.Warnf("Link %q reached inconsistent error state", u.String())
|
||||
}
|
||||
if linkType == linkTypePersistent {
|
||||
// If the link is a persistent configured peering,
|
||||
// store information about the connection error so
|
||||
|
Loading…
Reference in New Issue
Block a user