Explorar o código

fix function clause

Ery Lee %!s(int64=11) %!d(string=hai) anos
pai
achega
c803ce0d7a
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      apps/emqtt/src/emqtt_server.erl

+ 2 - 1
apps/emqtt/src/emqtt_server.erl

@@ -25,6 +25,7 @@
 -author('feng@slimpp.io').
 
 -include("emqtt.hrl").
+-include("emqtt_topic.hrl").
 
 -behaviour(gen_server).
 
@@ -125,7 +126,7 @@ match(Topics) ->
     lists:flatten([match(Topic, RetainedTopics) || Topic <- Topics]).
 
 match(Topic, RetainedTopics) ->
-    case emqtt_topic:type(Topic) of
+    case emqtt_topic:type(#topic{name=Topic}) of
         direct -> %% FIXME
             [Topic];
         wildcard ->