Replacing the old connection on a duplicate login made the client reconnect in a tight loop. Instead, park the new connection in a standby list keyed by clientID and promote it into the main host list only after the old connection is removed by heartbeat timeout or disconnect. Fix heartbeat attribution so a parked standby refreshes its own last-heartbeat time rather than the main connection's, otherwise the main never times out and the standby can never take over. Gate the offline notification on an actual removal with no promoted standby to avoid a spurious "host offline" when takeover happens. Skip promoting a standby already marked removed, and reuse the normal login sign/settings path when a standby is promoted. Co-Authored-By: deepseek-v4-pro
489 KiB
489 KiB