fix(watchdog): refactored tcp recvMsg function, now the watchdog can be connected correctly
- Refactor TCP message reading to use ReadBytes and TrimSpace for better reliability - Add connection success logging in main.go - Update .gitignore to include logs.db-journal
This commit is contained in:
@@ -105,11 +105,12 @@ func main() {
|
||||
} else {
|
||||
if !watchdog.Connect("127.0.0.1", config.Watchdog.Port) {
|
||||
postLog.Error(fmt.Sprintf("Failed to connect to Watchdog at %s:%d", "127.0.0.1", config.Watchdog.Port))
|
||||
} else {
|
||||
postLog.Info(fmt.Sprintf("Connected to Watchdog at %s:%d", "127.0.0.1", config.Watchdog.Port))
|
||||
is.watchdogConnected = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
addr := fmt.Sprintf("%s:%s", config.ListenAddr, config.ListenPort)
|
||||
server := &http.Server{
|
||||
Addr: addr,
|
||||
|
||||
Reference in New Issue
Block a user