[PATCH] added timeout reset in serve_http_file_fragment to prevent timeout on big files
This commit is contained in:
parent
3ae1badae7
commit
5400f47efe
1 changed files with 1 additions and 0 deletions
|
@ -538,6 +538,7 @@ LWS_VISIBLE int libwebsockets_serve_http_file_fragment(
|
|||
if (n < 0)
|
||||
return -1; /* caller will close */
|
||||
if (n) {
|
||||
libwebsocket_set_timeout(wsi, PENDING_TIMEOUT_HTTP_CONTENT, AWAITING_TIMEOUT);
|
||||
wsi->u.http.filepos += n;
|
||||
m = libwebsocket_write(wsi, context->service_buffer, n,
|
||||
wsi->u.http.filepos == wsi->u.http.filelen ? LWS_WRITE_HTTP_FINAL : LWS_WRITE_HTTP);
|
||||
|
|
Loading…
Add table
Reference in a new issue