]> git.sesse.net Git - vlc/blobdiff - modules/access/http.c
Enable tcp keep alive in http
[vlc] / modules / access / http.c
index 4d27b83d38613472c2964444b86b99254ad7ee54..d53b6c320a46ad2756e14e953ea30ff4f40cf01d 100644 (file)
@@ -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 )