Skip to content

Commit

Permalink
set accept FD to be non blocking. Helps with #5286
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jan 29, 2024
1 parent 10089d5 commit 56c70e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/io/master.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56c70e1

Please sign in to comment.