diff options
author | Aoang <aoang@x2ox.com> | 2022-03-20 21:34:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-20 14:34:31 +0100 |
commit | f3bce3aa6e9450a6f69ae3f98b6db0958d67233c (patch) | |
tree | e526052c5f4d730d6dec67c71dcdaa6ee8068b77 /client.go | |
parent | Fix race conditions in tests (diff) | |
download | fasthttp-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.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 { |