mirror of https://github.com/docker/cli.git
Merge 2e01d90774 into 6ec32660e9
This commit is contained in:
commit
f98973211e
|
|
@ -59,6 +59,13 @@ func (h *hijackedIOStreamer) stream(ctx context.Context) error {
|
|||
outputDone := h.beginOutputStream(restoreInput)
|
||||
inputDone, detached := h.beginInputStream(restoreInput)
|
||||
|
||||
defer func() {
|
||||
// Close the pipe after the outputStream had done.
|
||||
if err := h.resp.CloseWrite(); err != nil {
|
||||
logrus.Debugf("Couldn't send EOF: %s", err)
|
||||
}
|
||||
}()
|
||||
|
||||
select {
|
||||
case err := <-outputDone:
|
||||
return err
|
||||
|
|
@ -178,11 +185,6 @@ func (h *hijackedIOStreamer) beginInputStream(restoreInput func()) (doneC <-chan
|
|||
logrus.Debugf("Error sendStdin: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err := h.resp.CloseWrite(); err != nil {
|
||||
logrus.Debugf("Couldn't send EOF: %s", err)
|
||||
}
|
||||
|
||||
close(inputDone)
|
||||
}()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue