From 420137ea9d36be85f73a42f1a551df98930911af Mon Sep 17 00:00:00 2001 From: Luciano Iam Date: Fri, 10 Apr 2020 08:43:06 +0200 Subject: WebSockets: always return -1 from send_index_body() unless there is a write error --- libs/surfaces/websockets/server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index bc89168702..1fb0fbee74 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -405,7 +405,7 @@ WebsocketsServer::send_index_body (Client wsi) /* lws_http_transaction_completed() returns 1 if the HTTP connection must close now Returns 0 and resets connection to wait for new HTTP header / transaction if possible */ if (lws_http_transaction_completed (wsi) != 1) { - return 1; + return -1; } return -1; // end connection -- cgit v1.2.3