From f10ca9f8e06b82cad244a17705f0d12c3a7e8a40 Mon Sep 17 00:00:00 2001 From: Dean Karn Date: Thu, 22 Dec 2022 15:02:26 -0800 Subject: [PATCH] Add EPIPE to retryable errors --- README.md | 2 +- errors/retryable.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5612cd2..4144e5c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # pkg -![Project status](https://img.shields.io/badge/version-5.7.0-green.svg) +![Project status](https://img.shields.io/badge/version-5.8.0-green.svg) [![Build Status](https://travis-ci.org/go-playground/pkg.svg?branch=master)](https://travis-ci.org/go-playground/pkg) [![Coverage Status](https://coveralls.io/repos/github/go-playground/pkg/badge.svg?branch=master)](https://coveralls.io/github/go-playground/pkg?branch=master) [![GoDoc](https://godoc.org/github.com/go-playground/pkg?status.svg)](https://pkg.go.dev/mod/github.com/go-playground/pkg/v5) diff --git a/errors/retryable.go b/errors/retryable.go index 989af7f..b9f007f 100644 --- a/errors/retryable.go +++ b/errors/retryable.go @@ -84,6 +84,9 @@ func IsTemporaryConnection(err error) (retryType string, isRetryable bool) { if errors.Is(err, syscall.EINTR) { return "eintr", true } + if errors.Is(err, syscall.EPIPE) { + return "epipe", true + } } return "", false }