aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorGravatar chenyunfei <chenyunfei.cs@gmail.com> 2023-10-21 18:38:07 +0800
committerGravatar GitHub <noreply@github.com> 2023-10-21 12:38:07 +0200
commit772e4aadb76a6296762b26057de61bd91f8101d9 (patch)
tree80e127a44de3a632e80c90011470d3984954fa70 /client.go
parentUpdate dependencies (diff)
downloadfasthttp-772e4aadb76a6296762b26057de61bd91f8101d9.tar.gz
fasthttp-772e4aadb76a6296762b26057de61bd91f8101d9.tar.bz2
fasthttp-772e4aadb76a6296762b26057de61bd91f8101d9.zip
BUGFIX: HostClient.DialDualStack not work when using DoDeadline (#1634)
Co-authored-by: chenyunfei.cs <chenyunfei.cs@bytedance.com>
Diffstat (limited to 'client.go')
-rw-r--r--client.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/client.go b/client.go
index d1c8549..1c1b486 100644
--- a/client.go
+++ b/client.go
@@ -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)
}
}