mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-06-11 01:04:56 +02:00
1d47c9c0e8
Werkzeug dev server can't upgrade WebSockets, so every io() upgrade attempt returned HTTP 500 and clients fell into a polling/upgrade reconnect loop — visible as 10-15s freezes on app load. Force transports: ['polling'] on /chat, /console and /logs clients; long-poll keeps real-time pushes working with ~1-2s latency. When the MeshCore device briefly stalls, get_channel_info() used to block on the default 30s timeout per slot, so iterating max_channels slots could take minutes; in practice only Public answered and the rest timed out, leaving the UI with just one channel. Drop per-call timeout to 3s, raise TimeoutError to the caller, and have cli.get_channels() break on first timeout and merge the remaining slots from the channels table in the DB (which already mirrors device state via upsert_channel). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>