WebSocket

1006 Abnormal Closure

A reserved value indicating the connection was closed abnormally without a Close frame being sent. This code must not be set by an endpoint.

Khi bạn thấy mã này

The TCP connection dropped unexpectedly — the server crashed, the network cable was unplugged, or a firewall killed the idle connection. No proper WebSocket Close handshake occurred.

Cách khắc phục

Implement reconnection with exponential backoff. Use WebSocket ping/pong frames to detect dead connections early. Check for network-level timeouts or aggressive load balancer idle limits.

Thông số kỹ thuật

Xem RFC / Thông số kỹ thuật →

Hướng dẫn

Thuật ngữ