Skip to content

Commit

Permalink
fix: bad match for non-zero PUBREC packet (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
turtleDeng authored and HJianBo committed Nov 23, 2021
1 parent b3c6cba commit 5a2c987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emqtt.erl
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ connected(cast, Packet = ?PUBLISH_PACKET(?QOS_2, _PacketId), State) ->
connected(cast, ?PUBACK_PACKET(_PacketId, _ReasonCode, _Properties) = PubAck, State) ->
{keep_state, delete_inflight(PubAck, State)};

connected(cast, ?PUBREC_PACKET(PacketId), State = #state{inflight = Inflight}) ->
connected(cast, ?PUBREC_PACKET(PacketId, _ReasonCode), State = #state{inflight = Inflight}) ->
NState = case maps:find(PacketId, Inflight) of
{ok, {publish, _Msg, _Ts}} ->
Inflight1 = maps:put(PacketId, {pubrel, PacketId, os:timestamp()}, Inflight),
Expand Down

0 comments on commit 5a2c987

Please sign in to comment.