refactor(watchdog): remove tcp socket connection and add local unix sock connection
This commit is contained in:
@@ -29,7 +29,7 @@ func StartKeepAlive() error {
|
||||
continue
|
||||
}
|
||||
|
||||
if Connect("127.0.0.1", global.CurrentConfig.Watchdog.Port) {
|
||||
if err = Init(); err == nil && Connect() {
|
||||
global.Is.WatchdogConnected = true
|
||||
postLog.Info("[watchdog] successfully reconnected to watchdog")
|
||||
lastErr = nil
|
||||
@@ -37,7 +37,7 @@ func StartKeepAlive() error {
|
||||
}
|
||||
|
||||
lastErr = fmt.Errorf("failed to connect to watchdog")
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
time.Sleep(1000 * time.Millisecond)
|
||||
}
|
||||
|
||||
if lastErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user