projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74e5c6f
)
write_sensu: enable TCP keepalive on network socket
author
Marc Fournier
<marc.fournier@camptocamp.com>
Sat, 13 Feb 2016 11:29:30 +0000
(12:29 +0100)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Tue, 9 Aug 2016 09:07:01 +0000
(11:07 +0200)
src/write_sensu.c
patch
|
blob
|
history
diff --git
a/src/write_sensu.c
b/src/write_sensu.c
index
b07b3bf
..
77069c0
100644
(file)
--- a/
src/write_sensu.c
+++ b/
src/write_sensu.c
@@
-196,6
+196,8
@@
static int sensu_connect(struct sensu_host *host) /* {{{ */
if (setsockopt(host->s, SOL_SOCKET, SO_LINGER, &so_linger, sizeof so_linger) != 0)
WARNING("write_sensu plugin: failed to set socket close() lingering");
+ set_sock_opts(host->s);
+
// connect the socket
if (connect(host->s, ai->ai_addr, ai->ai_addrlen) != 0) {
close(host->s);