Skip to content

Commit

Permalink
Catch the error
Browse files Browse the repository at this point in the history
  • Loading branch information
noborus committed May 4, 2022
1 parent 0fc45e0 commit 19460ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ func Progress(targets []string) {
log.Println(err)
return
}
defer monitor.DisConnect()
defer func() {
if err := monitor.DisConnect(); err != nil {
log.Println(err)
}
}()

monitor.Targets(targets)
model := tui.NewModel(monitor)
Expand Down

0 comments on commit 19460ef

Please sign in to comment.