Case description: Send close with valid close code 1010
The problem is that code 1010 may NOT be used by the server.
From RFC6455:
1010 indicates that an endpoint (client) is terminating the
connection because it has expected the server to negotiate one or
more extension, but the server didn't return them in the response
message of the WebSocket handshake. The list of extensions that
are needed SHOULD appear in the /reason/ part of the Close frame.
Note that this status code is not used by the server, because it
can fail the WebSocket handshake instead.
Case description:
Send close with valid close code 1010The problem is that code 1010 may NOT be used by the server.
From RFC6455: