timer: better handling of conn.Close
This commit is contained in:
parent
df19a8c2f5
commit
ea6b2be648
@ -69,8 +69,10 @@ func Run(cmd *cobra.Command, args []string) {
|
||||
|
||||
_, err = c.Create(context.Background(), &api.Timer{Duration: d})
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
log.Fatal().Err(err).Msg("could not create timer")
|
||||
}
|
||||
|
||||
conn.Close()
|
||||
log.Info().Msg("added timer")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user