diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-16 20:49:33 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-16 20:49:33 +0200 |
commit | 1987a7411f6aab1b0534ef23dc8797362eae1076 (patch) | |
tree | 47c52d7b27c3b76cb1356f1a512105f1df2e8592 /plugins/mod_bosh.lua | |
parent | 903e945d09ffd94ebf3f08b6c5092a56ad484348 (diff) | |
download | prosody-1987a7411f6aab1b0534ef23dc8797362eae1076.tar.gz prosody-1987a7411f6aab1b0534ef23dc8797362eae1076.zip |
plugins: Switch to :get_option_period() for time range options
Improves readability ("1 day" vs 86400) and centralizes validation.
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r-- | plugins/mod_bosh.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 34d801d9..c505e152 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -36,12 +36,12 @@ local BOSH_HOLD = 1; local BOSH_MAX_REQUESTS = 2; -- The number of seconds a BOSH session should remain open with no requests -local bosh_max_inactivity = module:get_option_number("bosh_max_inactivity", 60); +local bosh_max_inactivity = module:get_option_period("bosh_max_inactivity", 60); -- The minimum amount of time between requests with no payload -local bosh_max_polling = module:get_option_number("bosh_max_polling", 5); +local bosh_max_polling = module:get_option_period("bosh_max_polling", 5); -- The maximum amount of time that the server will hold onto a request before replying -- (the client can set this to a lower value when it connects, if it chooses) -local bosh_max_wait = module:get_option_number("bosh_max_wait", 120); +local bosh_max_wait = module:get_option_period("bosh_max_wait", 120); local consider_bosh_secure = module:get_option_boolean("consider_bosh_secure"); local cross_domain = module:get_option("cross_domain_bosh"); |