Fixed IPC calls in main to use new ip and port seperation in the config

This commit is contained in:
2026-06-06 23:42:54 -05:00
parent c3e17f9a80
commit 988bdfcf6c
3 changed files with 16 additions and 9 deletions

View File

@@ -60,8 +60,10 @@ func StartDaemon(cfg *AppConfig, configPath string) error {
mux.ServeHTTP(w, r)
})
listenAddress := cfg.Daemon.ListenAddress + ":" + strconv.Itoa(cfg.Daemon.Port)
server := &http.Server{
Addr: cfg.Daemon.ListenAddress,
Addr: listenAddress,
Handler: corsWrappedHandler,
}
@@ -69,7 +71,7 @@ func StartDaemon(cfg *AppConfig, configPath string) error {
signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
go func() {
fmt.Printf("Engine daemon actively listening on http://%s\n", cfg.Daemon.ListenAddress)
fmt.Printf("Engine daemon actively listening on http://%s\n", listenAddress)
if err := server.ListenAndServe(); err != http.ErrServerClosed {
fmt.Printf("Daemon runtime failure: %v\n", err)
}