fix dispatch
This commit is contained in:
parent
eda40bf232
commit
22797172a4
|
@ -98,7 +98,7 @@ handle_info({stop, duplicate_id, NewPid}, State=#state{conn_name=ConnName}) ->
|
||||||
stop({shutdown, duplicate_id}, State);
|
stop({shutdown, duplicate_id}, State);
|
||||||
|
|
||||||
%%TODO: ok??
|
%%TODO: ok??
|
||||||
handle_info({dispatch, From, Message}, #state{proto_state = ProtoState} = State) ->
|
handle_info({dispatch, {From, Message}}, #state{proto_state = ProtoState} = State) ->
|
||||||
{ok, ProtoState1} = emqtt_protocol:send_message({From, Message}, ProtoState),
|
{ok, ProtoState1} = emqtt_protocol:send_message({From, Message}, ProtoState),
|
||||||
{noreply, State#state{proto_state = ProtoState1}};
|
{noreply, State#state{proto_state = ProtoState1}};
|
||||||
|
|
||||||
|
|
|
@ -222,8 +222,9 @@ puback_qos(?PUBREC) -> ?QOS_0;
|
||||||
puback_qos(?PUBREL) -> ?QOS_1;
|
puback_qos(?PUBREL) -> ?QOS_1;
|
||||||
puback_qos(?PUBCOMP) -> ?QOS_0.
|
puback_qos(?PUBCOMP) -> ?QOS_0.
|
||||||
|
|
||||||
-spec send_message(Message, State) -> {ok, NewState} when
|
-spec send_message({From, Message}, State) -> {ok, NewState} when
|
||||||
Message :: {pid(), mqtt_message()},
|
From :: pid(),
|
||||||
|
Message :: mqtt_message(),
|
||||||
State :: proto_state(),
|
State :: proto_state(),
|
||||||
NewState :: proto_state().
|
NewState :: proto_state().
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue