Переглянути джерело

Add 'hibernate_after' option for zone

Feng Lee 6 роки тому
батько
коміт
8c1e452b6e
2 змінених файлів з 11 додано та 0 видалено
  1. 5 0
      etc/emqx.conf
  2. 6 0
      priv/emqx.schema

+ 5 - 0
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

+ 6 - 0
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]}}
 ]}.