[vlc-devel] [PATCH 1/4] httpd: update activity time before processing timeout
Rémi Denis-Courmont
remi at remlab.net
Wed Oct 28 15:22:41 CET 2020
Le keskiviikkona 28. lokakuuta 2020, 14.34.34 EET Thomas Guillem a écrit :
> From: Francois Cartegnie <git at videolan.org>
>
> ---
> src/network/httpd.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/network/httpd.c b/src/network/httpd.c
> index 52c8e5bdf3e..13feb383a14 100644
> --- a/src/network/httpd.c
> +++ b/src/network/httpd.c
> @@ -1743,6 +1743,11 @@ static void httpdLoop(httpd_host_t *host)
> break;
> }
>
> + if (val == 0) {
> + cl->i_activity_date = now;
> + delay = 0;
> + }
> +
> if (cl->i_state == HTTPD_CLIENT_DEAD
>
> || (cl->i_activity_timeout > 0
>
> && cl->i_activity_date + cl->i_activity_timeout < now)) {
> @@ -1751,11 +1756,6 @@ static void httpdLoop(httpd_host_t *host)
> continue;
> }
>
> - if (val == 0) {
> - cl->i_activity_date = now;
> - delay = 0;
> - }
> -
> struct pollfd *pufd = ufd + nfd;
> assert (pufd < ufd + ARRAY_SIZE (ufd));
I have already explained in version 1 *and* in version 2 that this looks
wrong. The only thing that this seems to do is prevent the HTTPd thread from
recovering if a bug in I/O processing caused it to get stuck.
-1
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list