From 7b64cd7835f1bacd326096fc5e41d44957a79230 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 4 May 2022 14:57:01 +0200 Subject: libpod: treat ECONNRESET as EOF when reading from the attach socket, treat ECONNRESET in the same way as EOF. [NO NEW TESTS NEEDED] Closes: https://github.com/containers/podman/issues/11446 Signed-off-by: Giuseppe Scrivano --- libpod/oci_attach_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go index c6af294d5..06f8f8719 100644 --- a/libpod/oci_attach_linux.go +++ b/libpod/oci_attach_linux.go @@ -9,6 +9,7 @@ import ( "net" "os" "path/filepath" + "syscall" "github.com/containers/common/pkg/config" "github.com/containers/podman/v4/libpod/define" @@ -259,7 +260,7 @@ func redirectResponseToOutputStreams(outputStream, errorStream io.Writer, writeO } } } - if er == io.EOF { + if errors.Is(er, io.EOF) || errors.Is(er, syscall.ECONNRESET) { break } if er != nil { -- cgit v1.2.3-54-g00ecf