File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ func (h *hijackedIOStreamer) stream(ctx context.Context) error {
4848 outputDone := h .beginOutputStream (restoreInput )
4949 inputDone , detached := h .beginInputStream (restoreInput )
5050
51+ defer func () {
52+ // Close the pipe after the outputStream had done.
53+ if err := h .resp .CloseWrite (); err != nil {
54+ logrus .Debugf ("Couldn't send EOF: %s" , err )
55+ }
56+ }()
57+
5158 select {
5259 case err := <- outputDone :
5360 return err
@@ -167,11 +174,6 @@ func (h *hijackedIOStreamer) beginInputStream(restoreInput func()) (doneC <-chan
167174 logrus .Debugf ("Error sendStdin: %s" , err )
168175 }
169176 }
170-
171- if err := h .resp .CloseWrite (); err != nil {
172- logrus .Debugf ("Couldn't send EOF: %s" , err )
173- }
174-
175177 close (inputDone )
176178 }()
177179
You can’t perform that action at this time.
0 commit comments