diff --git a/src/common/compat.c b/src/common/compat.c index 281b8ae6f0..689c7eaed4 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -450,8 +450,8 @@ set_max_file_descriptors(unsigned long limit, unsigned long cap) #ifndef HAVE_GETRLIMIT log_fn(LOG_INFO, LD_NET, "This platform is missing getrlimit(). Proceeding."); - if (limit > cap) { - log(LOG_INFO, LD_CONFIG, "ConnLimit must be at most %d. Capping it.", cap); + if (limit < cap) { + log(LOG_INFO, LD_CONFIG, "ConnLimit must be at most %d. Using that.", cap); limit = cap; } #else