unarr/internal/agent
Deivid Soto 2398707cc1 fix(ws): add ping/pong keepalive and read deadline to detect zombie connections
Without a SetReadDeadline, a silently dead WebSocket (e.g. Cloudflare
dropping the connection without a close frame) would block readLoop
forever. The daemon would appear connected but never receive tasks,
and never fall back to HTTP polling.

- Send RFC 6455 pings every 30s (resets Cloudflare's idle timer)
- SetReadDeadline of 45s, refreshed on every pong and text message
- SetWriteDeadline of 10s on all writes to prevent blocked sends
- On timeout, readLoop emits "disconnected" → HybridTransport falls
  back to HTTP and starts WS reconnection loop
2026-04-08 00:06:19 +02:00
..
client.go fix(agent): add retry with backoff and WebSocket connect for daemon registration 2026-04-06 17:26:32 +02:00
client_test.go fix(ci): fix lint errors and pin CI to Go 1.25 2026-03-31 22:15:12 +02:00
daemon.go feat(agent): send stream port and IPs in register request 2026-04-07 23:28:41 +02:00
disk.go feat(cli): add login command and refactor shared helpers 2026-04-01 12:20:51 +02:00
disk_unix.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
disk_windows.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
process_unix.go feat: add clean command to remove temp files, logs, and cached data 2026-03-29 11:04:51 +02:00
process_windows.go fix(build): unused variable in Windows process check 2026-03-30 13:11:55 +02:00
state.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
state_test.go feat: improve daemon resilience, streaming, and usenet downloads 2026-03-28 21:36:12 +01:00
transport.go fix(agent): add retry with backoff and WebSocket connect for daemon registration 2026-04-06 17:26:32 +02:00
transport_e2e_test.go refactor: migrate lint config to v2, remove daemon auto-upgrade, add trust badges 2026-03-30 23:24:16 +02:00
transport_http.go fix(lint): disable errcheck, tune gosec/exclusions for codebase state 2026-03-31 00:21:17 +02:00
transport_hybrid.go fix(lint): disable errcheck, tune gosec/exclusions for codebase state 2026-03-31 00:21:17 +02:00
transport_test.go feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
transport_ws.go fix(ws): add ping/pong keepalive and read deadline to detect zombie connections 2026-04-08 00:06:19 +02:00
types.go feat(agent): send stream port and IPs in register request 2026-04-07 23:28:41 +02:00