Implement exponential backoff
Use 1s, 2s, 4s, 8s (max 30s), and add jitter to reduce thundering herd.
Authenticate promptly
Send any required auth message immediately after connect to avoid policy timeouts (1008).
Review close code
See WSS error codes for guidance and actions.