This commit is contained in:
Feng 2016-02-16 02:17:14 +08:00
parent e605dcb111
commit 8ba6c5bbb6
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ insert(Topic) when is_binary(Topic) ->
mnesia:write(TrieNode#trie_node{topic=Topic});
[] ->
%add trie path
[add_path(Triple) || Triple <- emqttd_topic:triples(Topic)],
lists:foreach(fun add_path/1, emqttd_topic:triples(Topic)),
%add last node
mnesia:write(#trie_node{node_id=Topic, topic=Topic})
end.