Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] Added SO_KEEPALIVE in TCP sockets, so kernel keepalive settings manage timeouts in case of TCP hangs
@ 2022-06-07 15:46 David Maseda Neira
  0 siblings, 0 replies; only message in thread
From: David Maseda Neira @ 2022-06-07 15:46 UTC (permalink / raw)
  To: ffmpeg-devel

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".

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-07 15:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 15:46 [FFmpeg-devel] [PATCH] Added SO_KEEPALIVE in TCP sockets, so kernel keepalive settings manage timeouts in case of TCP hangs David Maseda Neira

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