Skip to content

Commit

Permalink
Merge pull request #739 from Icinga/retry-io-eof-error
Browse files Browse the repository at this point in the history
Retry `io.EOF` error
  • Loading branch information
julianbrost authored Apr 11, 2024
2 parents 6ff3ca5 + 1b380bb commit 919871f
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"
"syscall"
"time"
Expand Down Expand Up @@ -175,6 +176,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 919871f

Please sign in to comment.