X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fmain.c;h=61f206fdf3c863041523ad6d92808d65a3033f33;hp=0eb8e28251f2451ab229dc41cf0e62726fddc7c5;hb=f056029cc220cf6f218a29d48d9720f6603302bf;hpb=50121956c8e1876ae640538b342ceb737757169b diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 0eb8e2825..61f206fdf 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -70,6 +70,7 @@ #include "stream.h" #include "connection.h" #include "tracefile-array.h" +#include "tcp_keep_alive.h" static const char *help_msg = #ifdef LTTNG_EMBED_HELP @@ -899,6 +900,15 @@ restart: lttcomm_destroy_sock(newsock); goto error; } + + ret = socket_apply_keep_alive_config(newsock->fd); + if (ret < 0) { + ERR("Failed to apply TCP keep-alive configuration on socket (%i)", + newsock->fd); + lttcomm_destroy_sock(newsock); + goto error; + } + new_conn = connection_create(newsock, type); if (!new_conn) { lttcomm_destroy_sock(newsock);