Fix wrong default value for flapping_threshold

This commit is contained in:
HeeeJianBo 2019-06-05 11:42:07 +08:00
parent 4875384743
commit e2fa7f2877
1 changed files with 1 additions and 1 deletions

View File

@ -947,7 +947,7 @@ do_flapping_detect(Action, #pstate{zone = Zone,
client_id = ClientId, client_id = ClientId,
enable_flapping_detect = true}) -> enable_flapping_detect = true}) ->
BanExpiryInterval = emqx_zone:get_env(Zone, flapping_ban_expiry_interval, 3600000), BanExpiryInterval = emqx_zone:get_env(Zone, flapping_ban_expiry_interval, 3600000),
Threshold = emqx_zone:get_env(Zone, flapping_threshold, 20), Threshold = emqx_zone:get_env(Zone, flapping_threshold, {10, 60}),
Until = erlang:system_time(second) + BanExpiryInterval, Until = erlang:system_time(second) + BanExpiryInterval,
case emqx_flapping:check(Action, ClientId, Threshold) of case emqx_flapping:check(Action, ClientId, Threshold) of
flapping -> flapping ->