fix: revert to blocking connect-daemon, daemon connection now reliable
- Revert async connect-daemon thread (bt:make-thread unreliable — errors in the thread cause silent failure, no connection, no error message) - Restore blocking connect-daemon before with-terminal (original pattern that was working) - Revert /reconnect to synchronous call - Remove stale async thread code and error messages
This commit is contained in:
@@ -437,10 +437,12 @@ Event handlers + daemon I/O + main loop.
|
|||||||
(add-msg :system "* Goodbye *")
|
(add-msg :system "* Goodbye *")
|
||||||
(send-daemon (list :type :event :payload '(:action :quit)))
|
(send-daemon (list :type :event :payload '(:action :quit)))
|
||||||
(setf (st :running) nil))
|
(setf (st :running) nil))
|
||||||
;; /reconnect — re-establish daemon connection
|
;; /reconnect — re-establish daemon connection
|
||||||
((string-equal text "/reconnect")
|
((string-equal text "/reconnect")
|
||||||
(disconnect-daemon)
|
(disconnect-daemon)
|
||||||
(connect-daemon))
|
(add-msg :system "* Reconnecting... *")
|
||||||
|
(connect-daemon)
|
||||||
|
(setf (st :dirty) (list t t nil)))
|
||||||
;; Normal message
|
;; Normal message
|
||||||
(t
|
(t
|
||||||
(add-msg :user text)
|
(add-msg :user text)
|
||||||
@@ -905,8 +907,8 @@ supplied (e.g. \"/\"), pre-fill the select filter with it."
|
|||||||
(if (typep be 'cl-tty.backend:modern-backend) "modern" "simple")
|
(if (typep be 'cl-tty.backend:modern-backend) "modern" "simple")
|
||||||
w h))
|
w h))
|
||||||
;; Initial dirty all to trigger first redraw in loop
|
;; Initial dirty all to trigger first redraw in loop
|
||||||
(setq w (or (and (numberp w) (> w 0) w) 80)
|
(setq w (or (and (numberp w) (> w 0) w) 80)
|
||||||
h (or (and (numberp h) (> h 0) h) 24))
|
h (or (and (numberp h) (> h 0) h) 24))
|
||||||
(loop while (st :running) do
|
(loop while (st :running) do
|
||||||
(dolist (ev (drain-queue))
|
(dolist (ev (drain-queue))
|
||||||
(cond
|
(cond
|
||||||
|
|||||||
Reference in New Issue
Block a user