Explorar el Código

Disable the force GC if conn_force_gc_count = 0

Feng Lee hace 9 años
padre
commit
edd99dc5ed
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1 1
      etc/emq.conf
  2. 1 0
      src/emqttd_gc.erl

+ 1 - 1
etc/emq.conf

@@ -110,7 +110,7 @@ mqtt.max_packet_size = 64KB
 ## MQTT Connection
 ##--------------------------------------------------------------------
 
-## Force GC: pos_integer
+## Force GC: integer. Value 0 disabled the Force GC.
 mqtt.conn.force_gc_count = 100
 
 ##--------------------------------------------------------------------

+ 1 - 0
src/emqttd_gc.erl

@@ -26,6 +26,7 @@
 conn_max_gc_count() ->
     case emqttd:env(conn_force_gc_count) of
         {ok, I} when I > 0 -> I + rand:uniform(I);
+        {ok, I} when I =< 0 -> undefined;
         undefined -> undefined
     end.