aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-01-05 07:15:33 +0100
committerKim Alvefur <zash@zash.se>2019-01-05 07:15:33 +0100
commitb0ea55a155dfe034f2d2117ed05e8c513676ea63 (patch)
tree3142f8c52ab2b75311d69f4759635fc95720a6d0
parenta35dd91a12ab72517329e810aea69a8f50e09b48 (diff)
downloadprosody-b0ea55a155dfe034f2d2117ed05e8c513676ea63.tar.gz
prosody-b0ea55a155dfe034f2d2117ed05e8c513676ea63.zip
util.startup: Integrate util.promise with net.server main loop
-rw-r--r--util/startup.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/startup.lua b/util/startup.lua
index b3357783..ac4c2ac4 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -395,6 +395,13 @@ function startup.init_http_client()
{ capath = config_ssl.capath, cafile = config_ssl.cafile, verify = "peer", }, https_client);
end
+function startup.init_promise()
+ local promise = require "util.promise";
+
+ local timer = require "util.timer";
+ promise.set_nexttick(function(f) return timer.add_task(0, f); end);
+end
+
function startup.init_data_store()
require "core.storagemanager";
end
@@ -647,6 +654,7 @@ function startup.prosody()
startup.log_greeting();
startup.log_startup_warnings();
startup.load_secondary_libraries();
+ startup.init_promise();
startup.init_http_client();
startup.init_data_store();
startup.init_global_protection();