diff options
-rw-r--r-- | libs/surfaces/websockets/server.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index 2abd810c34..7455770a7d 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -398,7 +398,9 @@ WebsocketsServer::send_index_body (Client wsi) return 1; } - if (lws_http_transaction_completed (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; } |