Skip to content

Commit

Permalink
chore: bump packet id in send function
Browse files Browse the repository at this point in the history
  • Loading branch information
HJianBo committed Aug 24, 2022
1 parent 0cfa735 commit 09d6ec0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/emqtt.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ shoot(?PUB_REQ(Msg = #mqtt_msg{qos = QoS}, ExpireAt, Callback),
Inflight
),
State1 = ensure_retry_timer(NState#state{inflight = Inflight1}),
maybe_shoot(bump_last_packet_id(State1));
maybe_shoot(State1);
{error, Reason} ->
shutdown(Reason, State)
end.
Expand Down Expand Up @@ -1687,7 +1687,7 @@ send(Packet, State = #state{conn_mod = ConnMod, socket = Sock, proto_ver = Ver})
Data = emqtt_frame:serialize(Packet, Ver),
?LOG(debug, "SEND_Data", #{packet => Packet}, State),
case ConnMod:send(Sock, Data) of
ok -> {ok, State};
ok -> {ok, bump_last_packet_id(State)};
Error -> Error
end.

Expand Down

0 comments on commit 09d6ec0

Please sign in to comment.