fix: no reconnect storm on send failure, reduce refresh to 1 FPS
Validate and Test / validate-patches (push) Failing after 13s
Validate and Test / validate-patches (push) Failing after 13s
- try_send: don't reconnect on failure, just skip and retry next cycle - Background refresh: 5 FPS → 1 FPS to reduce router serial load - Revert Bridge.run() - RouterBridge uses Zephyr RTOS thread
This commit is contained in:
@@ -12,7 +12,7 @@ ROUTER_SOCK = os.environ.get("ROUTER_SOCK", "/var/run/arduino-router.sock")
|
||||
COLS = 13
|
||||
ROWS = 8
|
||||
|
||||
REFRESH_INTERVAL = 0.2
|
||||
REFRESH_INTERVAL = 1.0
|
||||
|
||||
STATS_FILE = "/tmp/viz-stats.json"
|
||||
_poll = select.poll()
|
||||
@@ -60,11 +60,7 @@ def try_send(router, data):
|
||||
router.sendall(data)
|
||||
return router, True
|
||||
except (BlockingIOError, OSError):
|
||||
try:
|
||||
router.close()
|
||||
except OSError:
|
||||
pass
|
||||
return connect_router(), False
|
||||
return router, False
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user