# HG changeset patch # User Link Mauve # Date 1769781810 -3600 # Node ID d5c7be7e73ca1e4bc6befc98dad925bcfed80983 # Parent 81f06628fea4906449eafc493ba76b579b2a4f71 mod_host_status_heartbeat: Switch to prosody.util.time.now() to get the current time diff -r 81f06628fea4 -r d5c7be7e73ca mod_host_status_heartbeat/mod_host_status_heartbeat.lua --- a/mod_host_status_heartbeat/mod_host_status_heartbeat.lua Fri Jan 30 15:03:21 2026 +0100 +++ b/mod_host_status_heartbeat/mod_host_status_heartbeat.lua Fri Jan 30 15:03:30 2026 +0100 @@ -1,5 +1,5 @@ local st = require "util.stanza"; -local time = require "socket".gettime; +local time = require "prosody.util.time".now; local heartbeat_interval = module:get_option_number("status_check_heartbeat_interval", 5); local heartbeat_mode = module:get_option_string("status_check_heartbeat_mode", "remote"); @@ -19,7 +19,7 @@ stanza = st.stanza("heartbeat", { xmlns = "xmpp:prosody.im/heartbeat" }); }); return heartbeat_interval; - end; + end; } local send_heartbeat = assert(heartbeat_methods[heartbeat_mode], "Unknown heartbeat_mode: "..heartbeat_mode);