Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Baumanar committed Oct 11, 2021
1 parent d3c6f3e commit c36137c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions database/cassandra/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ func (c *Cassandra) Open(url string) (database.Driver, error) {
}
}

if flag, err := strconv.ParseBool(u.Query().Get("disable-host-lookup")); err != nil && flag {
cluster.DisableInitialHostLookup = true
} else if err != nil {
return nil, err
if len(u.Query().Get("disable-host-lookup")) > 0 {
if flag, err := strconv.ParseBool(u.Query().Get("disable-host-lookup")); err != nil && flag {
cluster.DisableInitialHostLookup = true
} else if err != nil {
return nil, err
}
}

session, err := cluster.CreateSession()
Expand Down

0 comments on commit c36137c

Please sign in to comment.