From 7530bfb5faac07842c4049e001d15f10f6a8962b Mon Sep 17 00:00:00 2001 From: Feng Date: Mon, 19 Oct 2015 09:45:36 +0800 Subject: [PATCH] ets:insert --- src/emqttd_stats.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqttd_stats.erl b/src/emqttd_stats.erl index b1f52f06e..c7c7eaa5c 100644 --- a/src/emqttd_stats.erl +++ b/src/emqttd_stats.erl @@ -145,7 +145,7 @@ init([]) -> random:seed(now()), ets:new(?STATS_TAB, [set, public, named_table, {write_concurrency, true}]), Topics = ?SYSTOP_CLIENTS ++ ?SYSTOP_SESSIONS ++ ?SYSTOP_PUBSUB ++ ?SYSTOP_RETAINED, - [ets:insert(?STATS_TAB, {Topic, 0}) || Topic <- Topics], + ets:insert(?STATS_TAB, [{Topic, 0} || Topic <- Topics]), % Create $SYS Topics [ok = emqttd_pubsub:create(stats_topic(Topic)) || Topic <- Topics], % Tick to publish stats