Skip to content

Commit

Permalink
fix timeout duration type
Browse files Browse the repository at this point in the history
  • Loading branch information
c3mb0 committed May 2, 2016
1 parent fb64548 commit e02b1a0
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 @@ -55,7 +55,7 @@ func NewClient(certificate tls.Certificate, timeout ...int) *Client {
}
if len(timeout) > 0 {
transport.DialTLS = func(network, addr string, cfg *tls.Config) (net.Conn, error) {
return tls.DialWithDialer(&net.Dialer{Timeout: timeout[0] * time.Second}, network, addr, cfg)
return tls.DialWithDialer(&net.Dialer{Timeout: time.Duration(timeout[0]) * time.Second}, network, addr, cfg)
}
}
return &Client{
Expand Down

0 comments on commit e02b1a0

Please sign in to comment.