Timeout does not work with fasthttp.Client
Numenorean opened this issue · comments
Numenorean commented
Hello, I've faced with an issue when timeout param doesn't work with fasthttp client. Here is my func which i pass as an field Dial to the fasthttp.Client
func(addr string) (net.Conn, error) {
dialer := socks.Dial(proxyAddr + "?timeout=4s")
return dialer("tcp", addr)
}
and prepare the client:
fasthttp.Client{
Dial: prepareProxy(proxy),
}
I must admit that with a valid proxy it works
Hǎi-Liàng "Hal" Wáng commented
I found and fixed an issue where the timeout is not applied during the TCP dialing but only works after the connection is established. Could you fetch the latest v1.0.3
and give it a try?
Numenorean commented
@h12w thank you so much for replying right away, now it works