From 09c02b1c7ba402a40b6c5f1f25a56ee4fb6b331c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 7 Mar 2013 22:02:51 +1100 Subject: [PATCH] Shorten the time before keepalive probes are sent out and how frequently they're sent with stratum curls. --- util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util.c b/util.c index 44ab0b55..fd0e6733 100644 --- a/util.c +++ b/util.c @@ -200,8 +200,8 @@ out: #if CURL_HAS_KEEPALIVE static void keep_curlalive(CURL *curl) { - const int tcp_keepidle = 60; - const int tcp_keepintvl = 60; + const int tcp_keepidle = 45; + const int tcp_keepintvl = 30; const long int keepalive = 1; curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, keepalive); @@ -216,10 +216,10 @@ static void keep_alive(CURL *curl, __maybe_unused SOCKETTYPE fd) #else static void keep_sockalive(SOCKETTYPE fd) { - const int tcp_keepidle = 60; - const int tcp_keepintvl = 60; + const int tcp_keepidle = 45; + const int tcp_keepintvl = 30; const int keepalive = 1; - const int tcp_keepcnt = 5; + const int tcp_keepcnt = 1; setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof(keepalive)); # ifdef __linux