mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-15 13:22:19 +01:00
notify_subscribers connects to every subscriber socket and write_all()s the notification with the window manager locked (every command, the reaper and the event thread), with no timeout: a subscriber that stops reading stalls the lock holder, and with it every thread. komorebi_transport::notify_sockets skips a subscriber whose write fails with TimedOut or WouldBlock (warns, keeps it subscribed, goes on to the next); every other write error still aborts as before. The timeout itself is the caller's: the connect closure passed by the Windows daemon sets a 1 s write timeout on the stream. KDE and macOS pass connect closures without a timeout, so nothing changes for them. A new unit test covers the skip. The connect itself cannot be bounded (uds_windows has no connect timeout), and the listener's lock wait is untouched. BEHAVIOUR: a Windows subscriber that does not read for a second misses that notification instead of blocking the daemon. Gate needed: Windows e2e commands and config_reload, the lock stress, subscriber scenarios if any. Verified: native cargo test -p komorebi-transport 14 passed (incl. the new test); tools/fast-check native, Windows clippy -D warnings and KDE check + lib tests PASS; macOS type-check run by hand (fast-check's macOS step fails to select a package on this merged tree) PASS. e2e not run.