You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two changes to eliminate the dual-launch race condition:
1. start.sh: Remove bridge launch — only does pre-cleanup now
(kill stale PID, tmux session, port holders). The bridge needs
PI_SESSION_ID which isn't known until pi starts, so start.sh
can't own it.
2. startup-cleanup.sh: Add max retries + backoff to restart loop
- Tracks consecutive fast failures (<60s runtime)
- Gives up after 10 consecutive fast failures (logs FATAL)
- Backs off: 5s base + 2s per failure, capped at 60s
- Kills port holders before retrying (prevents EADDRINUSE spin)
- Logs attempt count, runtime duration, and failure state
Previously, start.sh launched a bridge as a background subshell
before pi, and startup-cleanup.sh launched another in tmux after
pi started. This caused port conflicts, orphaned supervisors, and
dropped messages when the pre-pi bridge couldn't find the session
socket.
0 commit comments