summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorLuciano Iam <lucianito@gmail.com>2020-04-10 08:23:33 +0200
committerRobin Gareus <robin@gareus.org>2020-04-11 22:30:33 +0200
commit731ea79028cb8e0d485b38823510bc471843ab03 (patch)
treee42473aa0ec6f8e64344b819fe8cb981d04011e0 /libs
parentf18a7e3fc32d43fbf14000e5513e4eace3d76604 (diff)
WebSockets: fix timeout when sending HTTP body
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/websockets/server.cc4
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;
}