]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
soft fail if too many FDs
authorAlan T. DeKok <aland@freeradius.org>
Tue, 27 Mar 2018 12:30:56 +0000 (08:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 27 Mar 2018 12:30:56 +0000 (08:30 -0400)
src/main/process.c

index d938f88aedebf23a45cc4bbc87bd4f10e5a41c95..76eb3dea4ab2ecd94ee4b3ed7cc4ff9040d9f450 100644 (file)
@@ -4883,14 +4883,14 @@ static int event_new_fd(rad_listen_t *this)
                /*
                 *      All sockets: add the FD to the event handler.
                 */
-               if (!fr_event_fd_insert(el, 0, this->fd,
-                                       event_socket_handler, this)) {
-                       ERROR("Failed adding event handler for socket: %s", fr_strerror());
-                       fr_exit(1);
+               if (fr_event_fd_insert(el, 0, this->fd,
+                                      event_socket_handler, this)) {
+                       this->status = RAD_LISTEN_STATUS_KNOWN;
+                       return 1;
                }
 
-               this->status = RAD_LISTEN_STATUS_KNOWN;
-               return 1;
+               ERROR("Failed adding event handler for socket: %s", fr_strerror());
+               this->status = RAD_LISTEN_STATUS_REMOVE_NOW;
        } /* end of INIT */
 
 #ifdef WITH_TCP