# HG changeset patch # User Kim Alvefur # Date 1522334178 -7200 # Node ID 580c13ed0ca100637af1f3dd2938553d9ac0fdac # Parent 0499f3da0ec449d00310639a8b22253ece57365a util.startup: Initialize the 'prosody' global earlier (various things needs the global util.events instance) diff -r 0499f3da0ec4 -r 580c13ed0ca1 util/startup.lua --- a/util/startup.lua Thu Mar 29 16:27:11 2018 +0200 +++ b/util/startup.lua Thu Mar 29 16:36:18 2018 +0200 @@ -496,8 +496,8 @@ -- prosodyctl only function startup.prosodyctl() + startup.init_global_state(); startup.read_config(); - startup.init_global_state(); startup.setup_plugindir(); startup.setup_datadir(); startup.chdir(); @@ -517,13 +517,13 @@ function startup.prosody() -- These actions are in a strict order, as many depend on -- previous steps to have already been performed + startup.init_global_state(); startup.read_config(); startup.sanity_check(); startup.sandbox_require(); startup.set_function_metatable(); startup.check_dependencies(); startup.load_libraries(); - startup.init_global_state(); startup.setup_plugindir(); startup.setup_datadir(); startup.init_logging();