mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
parent
7f9d4f3f6d
commit
e41b838d8f
2 changed files with 50 additions and 1 deletions
|
@ -13,7 +13,15 @@ func (c *Core) _applyOption(opt SetupOption) (err error) {
|
|||
if err != nil {
|
||||
return fmt.Errorf("unable to parse peering URI: %w", err)
|
||||
}
|
||||
return c.links.add(u, v.SourceInterface, linkTypePersistent)
|
||||
err = c.links.add(u, v.SourceInterface, linkTypePersistent)
|
||||
switch err {
|
||||
case ErrLinkAlreadyConfigured:
|
||||
// Don't return this error, otherwise we'll panic at startup
|
||||
// if there are multiple of the same peer configured
|
||||
return nil
|
||||
default:
|
||||
return err
|
||||
}
|
||||
case ListenAddress:
|
||||
c.config._listeners[v] = struct{}{}
|
||||
case NodeInfo:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue