Fix sent close code when failing the connection
This commit is contained in:
parent
5c380878d5
commit
2e1127e371
|
@ -1832,7 +1832,7 @@ backend_ws_send_control (struct ws_context *self,
|
||||||
static bool
|
static bool
|
||||||
backend_ws_fail (struct ws_context *self, enum ws_status reason)
|
backend_ws_fail (struct ws_context *self, enum ws_status reason)
|
||||||
{
|
{
|
||||||
uint8_t payload[2] = { reason << 8, reason };
|
uint8_t payload[2] = { reason >> 8, reason };
|
||||||
(void) backend_ws_send_control (self, WS_OPCODE_CLOSE,
|
(void) backend_ws_send_control (self, WS_OPCODE_CLOSE,
|
||||||
payload, sizeof payload);
|
payload, sizeof payload);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue