diff --git a/cmd/zetaclientd-supervisor/lib.go b/cmd/zetaclientd-supervisor/lib.go index e65782c6b1..e2e54ba7a6 100644 --- a/cmd/zetaclientd-supervisor/lib.go +++ b/cmd/zetaclientd-supervisor/lib.go @@ -67,7 +67,6 @@ type zetaclientdSupervisor struct { upgradesDir string upgradePlanName string enableAutoDownload bool - restartChan chan os.Signal } func newZetaclientdSupervisor( @@ -83,15 +82,12 @@ func newZetaclientdSupervisor( if err != nil { return nil, fmt.Errorf("grpc dial: %w", err) } - // these signals will result in the supervisor process only restarting zetaclientd - restartChan := make(chan os.Signal, 1) return &zetaclientdSupervisor{ zetacoredConn: conn, logger: logger, reloadSignals: make(chan bool, 1), upgradesDir: defaultUpgradesDir, enableAutoDownload: enableAutoDownload, - restartChan: restartChan, }, nil } diff --git a/cmd/zetaclientd-supervisor/main.go b/cmd/zetaclientd-supervisor/main.go index d7179d6948..4a219a544f 100644 --- a/cmd/zetaclientd-supervisor/main.go +++ b/cmd/zetaclientd-supervisor/main.go @@ -50,8 +50,6 @@ func main() { os.Exit(1) } supervisor.Start(ctx) - // listen for SIGHUP to trigger a restart of zetaclientd - signal.Notify(supervisor.restartChan, syscall.SIGHUP) shouldRestart := true for shouldRestart { @@ -81,6 +79,7 @@ func main() { }) eg.Go(func() error { supervisor.WaitForReloadSignal(ctx) + cancel() return nil }) eg.Go(func() error { @@ -88,8 +87,6 @@ func main() { select { case <-ctx.Done(): return nil - case sig := <-supervisor.restartChan: - logger.Info().Msgf("got signal %d, sending SIGINT to zetaclientd", sig) case sig := <-shutdownChan: logger.Info().Msgf("got signal %d, shutting down", sig) shouldRestart = false