From 3bb1291fbd4f938bb9b7b3c2fe48b029ee0152d3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 10 Feb 2011 22:21:57 +0100 Subject: [PATCH] --keepalive-time: warn if not supported properly Since the feature requires support for TCP_KEEPIDLE and TCP_KEEPINTVL to function as documented, it now warns if that support is missing when the option is used. --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index cfff1f9825..1c707f89fc 100644 --- a/src/main.c +++ b/src/main.c @@ -1764,6 +1764,10 @@ static int sockoptcallback(void *clientp, curl_socket_t curlfd, warnf(clientp, "Could not set TCP_KEEPINTVL!\n"); return 0; } +#endif +#if !defined(TCP_KEEPIDLE) || !defined(TCP_KEEPINTVL) + warnf(clientp, "Keep-alive functionality somewhat crippled due to " + "missing support in your operating system!\n"); #endif } }