Skip to content

Commit

Permalink
BUGFIX: HostClient.DialDualStack not work when using DoDeadline
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyunfei.cs committed Oct 21, 2023
1 parent 24acb80 commit 3672dc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,9 @@ func (c *HostClient) dialHostHard(dialTimeout time.Duration) (conn net.Conn, err
dial := c.Dial
if dialTimeout != 0 && dial == nil {
dial = func(addr string) (net.Conn, error) {
if c.DialDualStack {
return DialDualStackTimeout(addr, dialTimeout)
}
return DialTimeout(addr, dialTimeout)
}
}
Expand Down

0 comments on commit 3672dc6

Please sign in to comment.