projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lttng-relayd: use TCP keep-alive mechanism to detect dead-peer
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index 0eb8e28251f2451ab229dc41cf0e62726fddc7c5..61f206fdf3c863041523ad6d92808d65a3033f33 100644
(file)
--- 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 "stream.h"
#include "connection.h"
#include "tracefile-array.h"
+#include "tcp_keep_alive.h"
static const char *help_msg =
#ifdef LTTNG_EMBED_HELP
static const char *help_msg =
#ifdef LTTNG_EMBED_HELP
@@
-899,6
+900,15
@@
restart:
lttcomm_destroy_sock(newsock);
goto error;
}
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);
new_conn = connection_create(newsock, type);
if (!new_conn) {
lttcomm_destroy_sock(newsock);
This page took
0.025093 seconds
and
4
git commands to generate.