From 1b380bb76e904dbe48f787708a0c5ea63d5bcfb5 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Thu, 11 Apr 2024 09:10:42 +0200 Subject: [PATCH] Retry `io.EOF` error --- pkg/retry/retry.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/retry/retry.go b/pkg/retry/retry.go index fd17eefc4..e5b93de33 100644 --- a/pkg/retry/retry.go +++ b/pkg/retry/retry.go @@ -7,6 +7,7 @@ import ( "github.com/icinga/icingadb/pkg/backoff" "github.com/lib/pq" "github.com/pkg/errors" + "io" "net" "syscall" "time" @@ -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