]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move scstart scheduler to after event init
authorAlan T. DeKok <aland@freeradius.org>
Tue, 20 Jun 2017 17:01:15 +0000 (13:01 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 20 Jun 2017 17:31:59 +0000 (13:31 -0400)
src/main/radiusd.c

index 8d1f10995fc0c272849a2dd182b80da2134bebb8..b0b82292bd8a3e31c0ad471ced64d16798f980de 100644 (file)
@@ -555,20 +555,6 @@ int main(int argc, char *argv[])
         */
        if (virtual_servers_instantiate(main_config.config) < 0) exit(EXIT_FAILURE);
 
-       /*
-        *      If this isn't just a config check, AND we have new
-        *      async listeners, then we open the sockets.
-        */
-       if (!check_config && main_config.namespace) {
-               sc = fr_schedule_create(NULL, &default_log, 1, 4, (fr_schedule_thread_instantiate_t) modules_thread_instantiate,
-                                       main_config.config);
-               if (!sc) {
-                       exit(EXIT_FAILURE);
-               }
-
-               if (virtual_servers_open(sc) < 0) exit(EXIT_FAILURE);
-       }
-
        /*
         *      Initialise the SNMP stats structures
         */
@@ -594,6 +580,20 @@ int main(int argc, char *argv[])
                fr_exit(EXIT_FAILURE);
        }
 
+       /*
+        *      If this isn't just a config check, AND we have new
+        *      async listeners, then we open the sockets.
+        */
+       if (!check_config && main_config.namespace) {
+               sc = fr_schedule_create(NULL, &default_log, 1, 4, (fr_schedule_thread_instantiate_t) modules_thread_instantiate,
+                                       main_config.config);
+               if (!sc) {
+                       exit(EXIT_FAILURE);
+               }
+
+               if (virtual_servers_open(sc) < 0) exit(EXIT_FAILURE);
+       }
+
        /*
         *      Initialize the threads ONLY if we're spawning, AND
         *      we're running normally.