Skip to content

Commit

Permalink
Declare defer statement at the start of method
Browse files Browse the repository at this point in the history
  • Loading branch information
moncho committed Jul 25, 2018
1 parent 5347a48 commit 51297e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/container_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,11 @@ func (h *containersScreenEventHandler) handleKey(key termbox.Key, f func(eventHa
//statsScreen shows container stats on the screen
//TODO move to appui
func statsScreen(container *docker.Container, stats *docker.StatsChannel, screen *ui.Screen, events <-chan termbox.Event, closeCallback func()) {
defer closeCallback()

if !docker.IsContainerRunning(container) {
return
}
defer closeCallback()
screen.ClearAndFlush()

info, infoLines := appui.NewContainerInfo(container)
Expand Down

0 comments on commit 51297e6

Please sign in to comment.