Skip to main content

Close Codes

When a WebSocket connection closes, it includes a numeric code and a reason string.

Standard Codes

TikTool Custom Codes

Handling Close Codes

Don’t reconnect on codes 4000, 4001, 4003, or 4004 - these indicate permanent conditions that won’t change on retry.