Skip to content
Snippets Groups Projects
Commit 4e4d5ca3 authored by Jake Taylor's avatar Jake Taylor
Browse files

cleanup; reduce kill timeout

parent 70607db8
No related branches found
No related tags found
No related merge requests found
......@@ -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 "+
......
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment