--keepalive-time: warn if not supported properly
authorDaniel Stenberg <daniel@haxx.se>
Thu, 10 Feb 2011 21:21:57 +0000 (22:21 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 10 Feb 2011 21:24:15 +0000 (22:24 +0100)
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

index cfff1f98258502bfd7a055c14e5a1bcef393eeac..1c707f89fc80642b6321a63a30260b0626b25e62 100644 (file)
@@ -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
       }
     }