mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-24 08:01:03 +00:00
Close stream when done with it
We should have been doing this from the start. Potential cause of a memory leak?
This commit is contained in:
parent
80af149b02
commit
a6ade7e78d
1 changed files with 2 additions and 0 deletions
|
|
@ -114,8 +114,10 @@ func (gui *Gui) writeContainerLogs(container *commands.Container, ctx context.Co
|
||||||
Follow: true,
|
Follow: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
gui.Log.Error(err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer readCloser.Close()
|
||||||
|
|
||||||
if container.DetailsLoaded() && container.Details.Config.Tty {
|
if container.DetailsLoaded() && container.Details.Config.Tty {
|
||||||
_, err = io.Copy(writer, readCloser)
|
_, err = io.Copy(writer, readCloser)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue