Skip to content

Commit

Permalink
fix(reconnect): puback error
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed Nov 17, 2023
1 parent 49afd0f commit 27dc523
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 @@ -1448,7 +1448,7 @@ handle_event(info, {Closed, Sock}, StateName, State)
{stop, {shutdown, Closed}, State};

handle_event(info, {'EXIT', Owner, Reason}, _, State = #state{owner = Owner}) ->
?LOG(debug, "EXIT_from_owner", #{reason => Reason}, State),
?LOG(error, "EXIT_from_owner", #{reason => Reason}, State),
{stop, {shutdown, {owner, Owner, Reason}}, State};

handle_event(info, {inet_reply, _Sock, ok}, _, _State) ->
Expand Down Expand Up @@ -1970,7 +1970,7 @@ host(Host) -> Host.
send_puback(Via, Packet, State) ->
case send(Via, Packet, State) of
{ok, NewState} -> {keep_state, NewState};
{error, Reason} -> {stop, {shutdown, Reason}}
{error, Reason} -> maybe_shutdown(Reason, State)
end.

send(Msg, State) ->
Expand Down

0 comments on commit 27dc523

Please sign in to comment.