Skip to content

Commit

Permalink
fix: issue with omiting endpoint
Browse files Browse the repository at this point in the history
fixes #156
  • Loading branch information
edevosc2c authored Jan 16, 2025
1 parent d710683 commit c57b5cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ func ParsePeers(cfg *ini.File, peers *[]PeerConfig) error {
peer.PreSharedKey = value
}

if value, err := parseString(section, "Endpoint"); err == nil {
if sectionKey, err := section.GetKey("Endpoint"); err == nil {
value := sectionKey.String()
decoded, err = resolveIPPAndPort(strings.ToLower(value))
if err != nil {
return err
Expand Down

0 comments on commit c57b5cd

Please sign in to comment.