test server extend timeout while sending leaf

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-04-10 11:11:06 +08:00
parent fe660b5c4b
commit c5d3ed328b

View file

@ -383,6 +383,10 @@ static int callback_http(struct libwebsocket_context *context,
/* partial write, adjust */
lseek(pss->fd, m - n, SEEK_CUR);
if (m) /* while still active, extend timeout */
libwebsocket_set_timeout(wsi,
PENDING_TIMEOUT_HTTP_CONTENT, 5);
} while (!lws_send_pipe_choked(wsi));
libwebsocket_callback_on_writable(context, wsi);
break;