WebSockets: always return -1 from send_index_body() unless there is a write error

This commit is contained in:
Luciano Iam 2020-04-10 08:43:06 +02:00 committed by Robin Gareus
parent d219cde926
commit 420137ea9d
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -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