aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorGravatar Aoang <aoang@x2ox.com> 2022-03-20 21:34:31 +0800
committerGravatar GitHub <noreply@github.com> 2022-03-20 14:34:31 +0100
commitf3bce3aa6e9450a6f69ae3f98b6db0958d67233c (patch)
treee526052c5f4d730d6dec67c71dcdaa6ee8068b77 /client.go
parentFix race conditions in tests (diff)
downloadfasthttp-f3bce3aa6e9450a6f69ae3f98b6db0958d67233c.tar.gz
fasthttp-f3bce3aa6e9450a6f69ae3f98b6db0958d67233c.tar.bz2
fasthttp-f3bce3aa6e9450a6f69ae3f98b6db0958d67233c.zip
Add Go 1.18 support (#1253)
* Add Go 1.18 support * fix Gosec Security Scanner https://github.com/valyala/fasthttp/runs/5595618634?check_suite_focus=true * fix https://github.com/securego/gosec/issues/469#issuecomment-1070608395 Gosec Github Action Doesn't Work at Go 1.18 * fix https://github.com/golangci/golangci-lint/pull/2438 golangci/golangci-lint Doesn't Work at Go 1.18 * fix golint unused * fix golint: SA1019: netErr.Temporary is deprecated * fix https://github.com/valyala/fasthttp/issues/1256
Diffstat (limited to 'client.go')
-rw-r--r--client.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/client.go b/client.go
index ee05507..aea7411 100644
--- a/client.go
+++ b/client.go
@@ -2631,8 +2631,8 @@ func (c *pipelineConnClient) init() {
for {
if err := c.worker(); err != nil {
c.logger().Printf("error in PipelineClient(%q): %s", c.Addr, err)
- if netErr, ok := err.(net.Error); ok && netErr.Temporary() {
- // Throttle client reconnections on temporary errors
+ if netErr, ok := err.(net.Error); ok && netErr.Timeout() {
+ // Throttle client reconnections on timeout errors
time.Sleep(time.Second)
}
} else {