Skip to content

Commit

Permalink
return most secure endpoint instead of least secure
Browse files Browse the repository at this point in the history
fixes #378
  • Loading branch information
coussej authored Sep 5, 2020
1 parent 60a88cb commit 77680a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func SelectEndpoint(endpoints []*ua.EndpointDescription, policy string, mode ua.
return nil
}

sort.Sort(bySecurityLevel(endpoints))
sort.Sort(sort.Reverse(bySecurityLevel(endpoints)))
policy = ua.FormatSecurityPolicyURI(policy)

// don't care -> return highest security level
Expand Down

0 comments on commit 77680a1

Please sign in to comment.