From 8c1e452b6e37bf120102b8290c44b4be0ba8aa9d Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Sat, 12 Oct 2019 16:56:18 +0800 Subject: [PATCH] Add 'hibernate_after' option for zone --- etc/emqx.conf | 5 +++++ priv/emqx.schema | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/etc/emqx.conf b/etc/emqx.conf index a211d91d9..9415834ef 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -554,6 +554,11 @@ mqtt.ignore_loop_deliver = false ## Value: duration zone.external.idle_timeout = 15s +## Hibernate after a duration of idle state. +## +## Value: duration +zone.external.hibernate_after = 60s + ## Publish limit for the external MQTT connections. ## ## Value: Number,Duration diff --git a/priv/emqx.schema b/priv/emqx.schema index 5e408ef38..abe646a10 100644 --- a/priv/emqx.schema +++ b/priv/emqx.schema @@ -725,6 +725,12 @@ end}. {datatype, {duration, ms}} ]}. +%% @doc Hibernate after a duration of idle state. +{mapping, "zone.$name.hibernate_after", "emqx.zones", [ + {default, "60s"}, + {datatype, {duration, ms}} +]}. + {mapping, "zone.$name.allow_anonymous", "emqx.zones", [ {datatype, {enum, [true, false]}} ]}.