Skip to content

Commit

Permalink
fix newConn is nil (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisChu authored Mar 3, 2023
1 parent 2aa065d commit 18f0e65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connection_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ func checkAddresses(confTimeout time.Duration, addresses []HostAddress, sslConfi

func pingAddress(address HostAddress, timeout time.Duration, sslConfig *tls.Config) error {
newConn := newConnection(address)
defer newConn.close()
// Open connection to host
if err := newConn.open(newConn.severAddress, timeout, sslConfig); err != nil {
return err
}
defer newConn.close()
return nil
}

0 comments on commit 18f0e65

Please sign in to comment.