container_attach: Ensure ctl file is closed
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
4b658672aa
commit
6f45c1726e
1 changed files with 1 additions and 0 deletions
|
@ -64,6 +64,7 @@ func (ss streamService) Attach(containerID string, inputStream io.Reader, output
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to open container ctl file: %v", err)
|
return fmt.Errorf("failed to open container ctl file: %v", err)
|
||||||
}
|
}
|
||||||
|
defer controlFile.Close()
|
||||||
|
|
||||||
kubecontainer.HandleResizing(resize, func(size remotecommand.TerminalSize) {
|
kubecontainer.HandleResizing(resize, func(size remotecommand.TerminalSize) {
|
||||||
logrus.Infof("Got a resize event: %+v", size)
|
logrus.Infof("Got a resize event: %+v", size)
|
||||||
|
|
Loading…
Reference in a new issue