Skip to content

Commit

Permalink
Merge pull request #13 from lebauce/fix-connection-error
Browse files Browse the repository at this point in the history
Return correct error when connection failed
  • Loading branch information
vtolstov authored Jul 18, 2019
2 parents a197864 + 49cd93e commit e49b8c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ const (
func Connect(endpoints string, tlsConfig *tls.Config) (*OvsdbClient, error) {
var c net.Conn
var err error
var u *url.URL

for _, endpoint := range strings.Split(endpoints, ",") {
u, err := url.Parse(endpoint)
if err != nil {
if u, err = url.Parse(endpoint); err != nil {
return nil, err
}
var host string
Expand Down

0 comments on commit e49b8c4

Please sign in to comment.