mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Perform a one-sided close of HTTP attach conn on EOF
On EOF of STDIN, we need to perform a one-sided close of the attach connection on the client side, to ensure that STDIN finishing will also cause the exec session to terminate, instead of hang. Fixes #7360 Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
@ -610,6 +610,9 @@ func attachExecHTTP(c *Container, sessionID string, r *http.Request, w http.Resp
|
||||
_, err := utils.CopyDetachable(conn, httpBuf, detachKeys)
|
||||
logrus.Debugf("STDIN copy completed")
|
||||
stdinChan <- err
|
||||
if connErr := conn.CloseWrite(); connErr != nil {
|
||||
logrus.Errorf("Unable to close conn: %v", connErr)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user