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.
On this page
When You See This Code
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.
How to Fix
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.
Specification
Compare With
Guides
Debugging Scenarios
Specifications
Glossary
Frequently Asked Questions
What is 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.
When do you see WebSocket 1006 Abnormal Closure?
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.
How to fix WebSocket 1006 Abnormal Closure?
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.