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_websocket.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_websocket.lua')
-rw-r--r-- | plugins/mod_websocket.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua index d03a4110..b94ee92d 100644 --- a/plugins/mod_websocket.lua +++ b/plugins/mod_websocket.lua @@ -31,7 +31,7 @@ local t_concat = table.concat; local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit", 1024 * 256); local frame_buffer_limit = module:get_option_number("websocket_frame_buffer_limit", 2 * stanza_size_limit); local frame_fragment_limit = module:get_option_number("websocket_frame_fragment_limit", 8); -local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5); +local stream_close_timeout = module:get_option_period("c2s_close_timeout", 5); local consider_websocket_secure = module:get_option_boolean("consider_websocket_secure"); local cross_domain = module:get_option("cross_domain_websocket"); if cross_domain ~= nil then |