TFChain WebSocket auto-reconnect and health endpoint #12

Closed
opened 2026-02-27 16:44:28 +00:00 by mik-tf · 0 comments
Member

The backend TFChain WebSocket connection dies permanently on disconnect (connection reset by peer, os error 54). Users see "restart required" error with no recovery until manual restart.

Requirements

  • Wrap TFChain client in RwLock for safe hot-swap on reconnect
  • Background health check every 30s, auto-reconnect on failure
  • GET /api/health endpoint returning chain status + latest block
  • Enhanced smoke tests for health, balance data, transfer prepare fields

Acceptance Criteria

  • Backend auto-recovers from WebSocket disconnect within 30s
  • /api/health returns 200 with latest_block when connected, 503 when disconnected
  • All 32 smoke tests pass including new data validation tests
  • All 56 cargo tests + 6 E2E tests still pass
The backend TFChain WebSocket connection dies permanently on disconnect (connection reset by peer, os error 54). Users see "restart required" error with no recovery until manual restart. ## Requirements - [ ] Wrap TFChain client in RwLock for safe hot-swap on reconnect - [ ] Background health check every 30s, auto-reconnect on failure - [ ] GET /api/health endpoint returning chain status + latest block - [ ] Enhanced smoke tests for health, balance data, transfer prepare fields ## Acceptance Criteria - Backend auto-recovers from WebSocket disconnect within 30s - /api/health returns 200 with latest_block when connected, 503 when disconnected - All 32 smoke tests pass including new data validation tests - All 56 cargo tests + 6 E2E tests still pass
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mycelium/www_migrate_mycelium#12
No description provided.