diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/thread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/thread.c b/lib/thread.c index 3d8b54467..7b5d2f311 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 |