From 56c70e195d65590026cc427c5e12a642a1ba8023 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 29 Jan 2024 14:45:46 -0500 Subject: [PATCH] set accept FD to be non blocking. Helps with #5286 --- src/lib/io/master.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/io/master.c b/src/lib/io/master.c index 04bff3962871..422fa8793384 100644 --- a/src/lib/io/master.c +++ b/src/lib/io/master.c @@ -1364,6 +1364,11 @@ static ssize_t mod_read(fr_listen_t *li, void **packet_ctx, fr_time_t *recv_time return 0; } + /* + * Set the new descriptor to be non-blocking. + */ + (void) fr_nonblock(accept_fd); + #ifdef STATIC_ANALYZER saremote.ss_family = AF_INET; /* static analyzer doesn't know that accept() initializes this */ #endif