diff --git a/cmd/root.go b/cmd/root.go index c66327020a25ba815afebfb68eb0315a688fb875..57fc71198cc006885ce5ccda12fe287b421ed849 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -91,7 +91,7 @@ var rootCmd = &cobra.Command{ case <-stopCh: jww.INFO.Printf( "Received Exit (SIGTERM or SIGINT) signal...\n") - instance.WaitUntilRoundCompletes(60 * time.Second) + instance.WaitUntilRoundCompletes(30 * time.Second) if profileOut != "" { pprof.StopCPUProfile() } @@ -134,7 +134,8 @@ func init() { rootCmd.Flags().String("profile-cpu", "", "Enable cpu profiling to this file") - viper.BindPFlag("profile-cpu", rootCmd.Flags().Lookup("profile-cpu")) + err = viper.BindPFlag("profile-cpu", rootCmd.Flags().Lookup("profile-cpu")) + handleBindingError(err, "profile-cpu") rootCmd.Flags().String("registrationCode", "", "Registration code used for first time registration. This is a unique "+ diff --git a/internal/round/manager.go b/internal/round/manager.go index d6f73f1b30dc4724a58766433ad6ed810ca72ad1..502bf63f9aa8739f1e1e42443dd275beeecd1cab 100644 --- a/internal/round/manager.go +++ b/internal/round/manager.go @@ -60,7 +60,7 @@ func (rm *Manager) GetRound(id id.Round) (*Round, error) { // as it is intended to be called from network handlers func (rm *Manager) GetPhase(id id.Round, phaseTy int32) (phase.Phase, error) { // First, check that the phase type id # is valid - if phaseTy < 0 || phaseTy >= int32(phase.NUM_PHASES) { + if phaseTy < 0 || phaseTy >= phase.NUM_PHASES { return nil, errors.Errorf("Invalid phase Type Number: %d", phaseTy) }