fix
This commit is contained in:
parent
760287e78a
commit
b673030c92
@ -69,6 +69,7 @@ init([]) ->
|
|||||||
{stop, Reason :: term(), NewState :: #state{}}).
|
{stop, Reason :: term(), NewState :: #state{}}).
|
||||||
handle_call({publish, ReceiverPid, Topic, Message, Qos}, _From, State = #state{conn_pid = ConnPid, inflight = InFlight}) ->
|
handle_call({publish, ReceiverPid, Topic, Message, Qos}, _From, State = #state{conn_pid = ConnPid, inflight = InFlight}) ->
|
||||||
%% [{qos, Qos}, {retain, true}]
|
%% [{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
|
case emqtt:publish(ConnPid, Topic, #{}, Message, [{qos, Qos}]) of
|
||||||
{ok, PacketId} ->
|
{ok, PacketId} ->
|
||||||
Ref = make_ref(),
|
Ref = make_ref(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user