aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index e02f083..df70df5 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -1540,11 +1540,23 @@ static int find_socket_info_index(int fd)
}
if ((size_t)fd >= socket_fds_max) {
+ /*
+ * Do not add a log here as some applications do stupid things
+ * like:
+ *
+ * for (fd = 0; fd <= getdtablesize(); fd++) {
+ * close(fd)
+ * };
+ *
+ * This would produce millions of lines of debug messages.
+ */
+#if 0
SWRAP_LOG(SWRAP_LOG_ERROR,
- "The max socket index limit of %zu has been reached, "
- "trying to add %d",
- socket_fds_max,
- fd);
+ "Looking for a socket info for the fd %d is over the "
+ "max socket index limit of %zu.",
+ fd,
+ socket_fds_max);
+#endif
return -1;
}