From: Sébastien Escudier Date: Mon, 16 Mar 2009 13:33:50 +0000 (+0100) Subject: Enable tcp keep alive in http X-Git-Tag: 1.0.0-pre1~57 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b1fdae4f897451b066f0c6f29c21c57491ea1f6d;p=vlc Enable tcp keep alive in http Signed-off-by: Rémi Denis-Courmont --- diff --git a/modules/access/http.c b/modules/access/http.c index 4d27b83d38..d53b6c320a 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -1019,6 +1019,7 @@ static int Connect( access_t *p_access, int64_t i_tell ) msg_Err( p_access, "cannot connect to %s:%d", srv.psz_host, srv.i_port ); return -1; } + setsockopt (p_sys->fd, SOL_SOCKET, SO_KEEPALIVE, &(int){ 1 }, sizeof (int)); /* Initialize TLS/SSL session */ if( p_sys->b_ssl == true )