From: Marc Fournier Date: Sat, 13 Feb 2016 11:29:30 +0000 (+0100) Subject: write_sensu: enable TCP keepalive on network socket X-Git-Tag: collectd-5.6.0~67^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f086e793482c4dd76786aff15a20a68973114467;p=collectd.git write_sensu: enable TCP keepalive on network socket --- diff --git a/src/write_sensu.c b/src/write_sensu.c index b07b3bf2..77069c08 100644 --- 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);