summaryrefslogtreecommitdiff
path: root/lib/thread.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2021-05-03 10:07:43 +0200
committerGitHub <noreply@github.com>2021-05-03 10:07:43 +0200
commitc8b084aab720a50dce4593412987e1a85e25e359 (patch)
treeb83d6eb9abd37a1771c6d9d7565f51b8aaa77fe0 /lib/thread.c
parent83187b82853d0bf905dacf4de93592f2207c35a6 (diff)
parent188acbb9a39ef2954b8ac08ed90a41de4fbae8c8 (diff)
Merge pull request #8607 from donaldsharp/better_reasoning
lib: Provide some better error handling for operator
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/thread.c b/lib/thread.c
index 3d8b544678..7b5d2f3113 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -862,7 +862,10 @@ struct thread *_thread_add_read_write(const struct xref_threadsched *xref,
xref->funcname, xref->xref.file, xref->xref.line,
t_ptr, fd, 0, arg, 0);
- assert(fd >= 0 && fd < m->fd_limit);
+ assert(fd >= 0);
+ if (fd >= m->fd_limit)
+ assert(!"Number of FD's open is greater than FRR currently configured to handle, aborting");
+
frr_with_mutex(&m->mtx) {
if (t_ptr && *t_ptr)
// thread is already scheduled; don't reschedule