This commit is contained in:
anlicheng 2023-06-20 10:10:14 +08:00
parent 760287e78a
commit b673030c92

View File

@ -69,6 +69,7 @@ init([]) ->
{stop, Reason :: term(), NewState :: #state{}}).
handle_call({publish, ReceiverPid, Topic, Message, Qos}, _From, State = #state{conn_pid = ConnPid, inflight = InFlight}) ->
%% [{qos, Qos}, {retain, true}]
lager:debug("[iot_mqtt_publisher] will publish message: ~p, topic: ~p, qos: ~p", [Message, Topic, Qos]),
case emqtt:publish(ConnPid, Topic, #{}, Message, [{qos, Qos}]) of
{ok, PacketId} ->
Ref = make_ref(),