mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 06:05:06 +03: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.
This commit is contained in:
parent
93a5adfd18
commit
54660e629a
1 changed files with 1 additions and 1 deletions
|
@ -273,7 +273,7 @@ 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 linkType == linkTypePersistent {
|
||||
// If the link is a persistent configured peering,
|
||||
// store information about the connection error so
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue