Disable the force GC if conn_force_gc_count = 0
This commit is contained in:
parent
1e36750288
commit
edd99dc5ed
|
@ -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
|
||||
|
||||
##--------------------------------------------------------------------
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue