fix: daemon port conflict handling, multi-port TUI connect
- start-daemon: handle ADDRESS-IN-USE-ERROR by trying ports 9105-9115 instead of crashing. Logs which port is used. - Add *daemon-port* defvar to track actual listening port - main: wrap start-daemon in handler-case so the daemon doesn't crash if all ports are in use - connect-daemon (TUI): try ports 9105-9115 with 2s timeout each instead of retrying the same port 3 times - Add debug messages for connection success and disconnection timestamp
This commit is contained in:
@@ -367,7 +367,10 @@ Boot sequence:
|
||||
|
||||
(when (fboundp 'events-start-heartbeat)
|
||||
(events-start-heartbeat))
|
||||
(start-daemon)
|
||||
(handler-case (start-daemon)
|
||||
(error (c)
|
||||
(log-message "DAEMON: Failed to start — ~a" c)
|
||||
(format *error-output* "~&DAEMON: Failed to start — ~a~%" c)))
|
||||
|
||||
#+sbcl
|
||||
(sb-sys:enable-interrupt sb-unix:sigint
|
||||
|
||||
Reference in New Issue
Block a user