TLS Handshake Failure
1015 TLS Handshake Failure is a reserved code that indicates the WebSocket connection was closed because the TLS (wss://) handshake failed. Like 1005 and 1006, it is never sent in an actual close frame – it is a pseudo-code that libraries return to application code when TLS negotiation fails before the WebSocket handshake.
Description
1015 is generated by WebSocket libraries when attempting to establish a wss:// connection and the TLS handshake fails. This can happen due to: expired or invalid server certificate, certificate hostname mismatch, untrusted CA, TLS version incompatibility, or cipher suite mismatch. Application code receiving 1015 should inspect the TLS error details, not attempt to reconnect without fixing the TLS configuration.
Common Causes
- –Server TLS certificate expired
- –Certificate hostname mismatch
- –Untrusted or self-signed certificate in wss://
- –TLS version or cipher mismatch
Code
1015
RFC
RFC 6455
Sent By
Reserved
Retry
No