From 5400f47efe74df5f26304a12884c5af78b634f0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=3D=3FUTF-8=3Fq=3FDalibor=3D20Ba=3DC4=3D8Da=3F=3D?= Date: Sat, 10 Oct 2015 18:17:42 +0200 Subject: [PATCH] [PATCH] added timeout reset in serve_http_file_fragment to prevent timeout on big files --- lib/output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/output.c b/lib/output.c index b914f28..6c5be88 100644 --- a/lib/output.c +++ b/lib/output.c @@ -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); -- 2.7.4