Skip to content

Commit

Permalink
Retry io.EOF error
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Apr 11, 2024
1 parent fd4ffda commit 7806d7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/icinga/icingadb/pkg/backoff"
"github.com/lib/pq"
"github.com/pkg/errors"
"io"
"net"
"strings"
"syscall"
Expand Down Expand Up @@ -136,6 +137,9 @@ func Retryable(err error) bool {
if errors.Is(err, syscall.EPIPE) {
return true
}
if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) {
return true
}

if errors.Is(err, driver.ErrBadConn) {
return true
Expand Down

0 comments on commit 7806d7f

Please sign in to comment.