Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: David Maseda Neira <david.maseda@cinfo.es>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH] Added SO_KEEPALIVE in TCP sockets, so kernel keepalive settings manage timeouts in case of TCP hangs
Date: Tue, 7 Jun 2022 17:46:06 +0200
Message-ID: <05a1e2e4-6681-fbef-0fa6-80fcd5c26a12@cinfo.es> (raw)

Signed-off-by: David Maseda Neira <david.maseda@cinfo.es>
---
  libavformat/network.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/libavformat/network.c b/libavformat/network.c
index 21e20b3e9a..0361346631 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -204,6 +204,12 @@ int ff_socket(int af, int type, int proto, void 
*logctx)
          }
      }
  #endif
+    if(type == SOCK_STREAM)
+    {
+        if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &(int){1}, 
sizeof(int))) {
+            av_log(logctx, AV_LOG_WARNING, "setsockopt(SO_KEEPALIVE) 
failed\n");
+        }
+    }
      return fd;
  }
  -- 2.36.1


-- 


CONFIDENCIALIDAD Y PROTECCIÓN DE DATOS

Este envío es privado y 
confidencial, estando destinado únicamente a la persona a la que ha sido 
enviado. Si usted no es el destinatario al que ha sido remitido, no puede 
copiar la información, distribuirla ni emprender con ella ningún tipo de 
acción. Si cree que lo ha recibido por error, por favor, notifíquelo al 
remitente y proceda a su eliminación.

Información Básica de Protección de 
Datos. Responsable: CINFO CONTENIDOS INFORMATIVOS PERSONALIZADOS, S.L. 
(B15757941) C/Antonio Insua Rivas 56,15008 Coruña. Finalidad: Inicio o 
mantenimiento de la relación profesional. Envío de información, respuesta a 
consultas y contactos genéricos. Legitimación: Consentimiento del 
interesado. Destinatarios: No se cederán datos a terceros salvo obligación 
legal. Derechos: Tiene derecho de acceso, oposición, limitación, supresión, 
rectificación y portabilidad de sus datos, mediante carta a la dirección 
postal indicada o enviando un email a gdpr@cinfo.es <mailto:gdpr@cinfo.es>. 
Si no quiere recibir envíos comerciales escriba a: gdpr@cinfo.es 
<mailto:gdpr@cinfo.es> Para más información sobre el uso de los datos, 
visite: https://www.cinfo.es/es/politica-privacidad/ 
<https://www.cinfo.es/es/politica-privacidad/>

Le recordamos que en 
cumplimiento de su Derecho a la Desconexión Digital, cualquier comunicación 
debe tratarse y/o responderse únicamente durante el horario de trabajo.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

                 reply	other threads:[~2022-06-07 15:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05a1e2e4-6681-fbef-0fa6-80fcd5c26a12@cinfo.es \
    --to=david.maseda@cinfo.es \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git