refactor(watchdog): remove tcp socket connection and add local unix sock connection

This commit is contained in:
2026-05-10 14:38:52 +08:00
parent 9c684241d1
commit ef27e7e0a9
10 changed files with 86 additions and 82 deletions
+3 -4
View File
@@ -76,11 +76,10 @@ func main() {
if err != nil {
postLog.Error(fmt.Sprintf("Unable to initialize Watchdog: %s", err))
} else {
if !watchdog.Connect("127.0.0.1", global.CurrentConfig.Watchdog.Port) {
postLog.Error(fmt.Sprintf("Failed to connect to Watchdog at %s:%d", "127.0.0.1", global.CurrentConfig.Watchdog.Port))
if !watchdog.Connect() {
postLog.Error("Failed to connect to Watchdog")
} else {
postLog.Info(fmt.Sprintf("Connected to Watchdog at %s:%d", "127.0.0.1", global.CurrentConfig.Watchdog.Port))
global.Is.WatchdogConnected = true
postLog.Info("Connected to Watchdog successfully")
go func() {
if err := watchdog.StartKeepAlive(); err != nil {