diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2021-10-30 13:45:10 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2021-10-30 13:45:10 +0200 |
commit | 2f1611f9185d3d4ce55fee3cef91b6ded5573976 (patch) | |
tree | 7f2e95007d68c3f0f2de3ca267e8108552e52083 /src | |
parent | PubSub: Add delete_expired_pubsub_items command (diff) |
mod_pubsub: Fix get_max_items_node/1 specification
Make it explicit that the get_max_items_node/1 function returns
?MAXITEMS if the 'max_items_node' option isn't specified. The function
didn't actually fall back to 'undefined' (but to the 'max_items_node'
default; i.e., ?MAXITEMS) anyway. This change just clarifies the
behavior and adjusts the function specification accordingly.
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_pubsub.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index a36c6e645..34a95da85 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -3579,9 +3579,9 @@ check_opt_range(Opt, Opts, Max) -> Val -> Val =< Max end. --spec get_max_items_node(host()) -> undefined | unlimited | non_neg_integer(). +-spec get_max_items_node(host()) -> unlimited | non_neg_integer(). get_max_items_node(Host) -> - config(Host, max_items_node, undefined). + config(Host, max_items_node, ?MAXITEMS). -spec get_max_item_expire_node(host()) -> infinity | non_neg_integer(). get_max_item_expire_node(Host) -> |