timer: better handling of conn.Close

This commit is contained in:
Marvin Preuss 2021-08-11 14:24:00 +02:00
parent df19a8c2f5
commit ea6b2be648

View File

@ -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")
}