Skip to content

Commit

Permalink
Fix dial to use net.DialTimeout function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonard Kramer authored and sv committed Jun 27, 2019
1 parent ba42099 commit d158093
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func DialUnix(host string, port int, auth string) (*KDBConn, error) {

// DialKDBTimeout connects to host:port using supplied user:password. Wait timeout for connection
func DialKDBTimeout(host string, port int, auth string, timeout time.Duration) (*KDBConn, error) {
conn, err := net.Dial("tcp", host+":"+fmt.Sprint(port))
conn, err := net.DialTimeout("tcp", host+":"+fmt.Sprint(port), timeout)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit d158093

Please sign in to comment.