mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-09 09:54:40 +00:00
On a host with two saved connections, the app replaced a working connection with the other one and showed "Reconnecting to host" for about two seconds each time. The adaptive switch rule needs three consecutive wins of at least 40 ms. It counted the cached alternate sample again on every active-only tick, so one measurement became three wins in 20 seconds. After a liveness-timeout reconnect it also compared the previous socket's heartbeat RTT with the alternate. A win now needs a candidate measured in the current probe cycle and a heartbeat RTT from the socket that is connected now, and the streak resets when the active client leaves connected or a fresh probe of the candidate fails. Closing a client with subscription releases in flight no longer publishes a false transport close or aborts close() midway. The host runtime does this on every legitimate switch. Follow-ups: #9147, #9149.