From 57e3d78291126a3456c6270731202345fec9978e Mon Sep 17 00:00:00 2001 From: Sujin Kang Date: Mon, 16 Aug 2021 07:31:39 -0700 Subject: [PATCH] Fix issue#8230 (#210) --- sonic-thermalctld/scripts/thermalctld | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonic-thermalctld/scripts/thermalctld b/sonic-thermalctld/scripts/thermalctld index bc25923dbf12..61aca9218b02 100644 --- a/sonic-thermalctld/scripts/thermalctld +++ b/sonic-thermalctld/scripts/thermalctld @@ -810,7 +810,8 @@ class ThermalControlDaemon(daemon_base.DaemonBase): self.log_info("Caught signal '{}' - exiting...".format(SIGNALS_TO_NAMES_DICT[sig])) exit_code = 128 + sig # Make sure we exit with a non-zero code so that supervisor will try to restart us self.thermal_monitor.task_stop() - self.thermal_manager.stop() + if self.thermal_manager: + self.thermal_manager.stop() self.stop_event.set() elif sig in NONFATAL_SIGNALS: self.log_info("Caught signal '{}' - ignoring...".format(SIGNALS_TO_NAMES_DICT[sig]))