diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-05-04 14:57:01 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-05-04 15:43:12 +0200 |
commit | 9974c90ccc119002780ddfa8bfce5f881c6c9372 (patch) | |
tree | 84486ad79c07446411cbcc25453ccce9dc3ec85b /libpod | |
parent | 1975975cf4bcf9ea16f5a49909f1357ec881e615 (diff) | |
download | podman-9974c90ccc119002780ddfa8bfce5f881c6c9372.tar.gz podman-9974c90ccc119002780ddfa8bfce5f881c6c9372.tar.bz2 podman-9974c90ccc119002780ddfa8bfce5f881c6c9372.zip |
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 <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/oci_attach_linux.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |