mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Keep-alive: disable timeout and let TCP ka kill.
This is required for streaming HTTP connections. Not sure if there's a more graceful way to handle this (maybe resetting the timeout in the 'send'-side code?
This commit is contained in:
parent
c7dbad66ab
commit
78228ed5cb
1 changed files with 3 additions and 1 deletions
|
@ -173,9 +173,11 @@ http_complete:
|
|||
lwsl_debug("libwebsocket_read: http_complete\n");
|
||||
/* Handle keep-alives, by preparing for a new request: */
|
||||
if (wsi->u.http.connection_type == HTTP_CONNECTION_KEEP_ALIVE) {
|
||||
lwsl_debug("libwebsocket_read: keep-alive\n");
|
||||
wsi->state = WSI_STATE_HTTP;
|
||||
wsi->mode = LWS_CONNMODE_HTTP_SERVING;
|
||||
lwsl_debug("libwebsocket_read: keep-alive\n");
|
||||
/* We might be streaming HTTP content, so leave the connection open.*/
|
||||
libwebsocket_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
|
||||
|
||||
if (lws_allocate_header_table(wsi))
|
||||
goto bail;
|
||||
|
|
Loading…
Add table
Reference in a new issue