From 2e1127e3711b53f8fa0d3ed6619bed88cbf80ce4 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Fri, 11 May 2018 22:33:47 +0200
Subject: Fix sent close code when failing the connection
---
json-rpc-shell.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 716e74c..7d104a2 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -1832,7 +1832,7 @@ backend_ws_send_control (struct ws_context *self,
static bool
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,
payload, sizeof payload);
--
cgit v1.2.3-70-g09d2