ipc: promote startup socket-wait to a shared DialWait; use in all modules

The cold-start crash-loop wasn't mavweb-specific — mavpoll and mavcaldav also
ipc.Dial + exit on failure, so they crash-looped until core booted too. Moved
the retry into ipc.DialWait (capped backoff, bounded) and switched mavweb,
mavpoll, mavcaldav to it. mavweb's local dialCoreWithRetry is gone.

Test: server appears after DialWait starts → it waits and connects.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
kami
2026-07-04 00:17:10 +04:00
parent a38e733514
commit 7683a9b32c
5 changed files with 67 additions and 33 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ func run(args []string) error {
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer stop()
core, err := ipc.Dial(*socket)
core, err := ipc.DialWait(*socket, 60*time.Second)
if err != nil {
return err
}