diff --git a/src/mqtt_client.erl b/src/mqtt_client.erl index 7d1bf75..738a0df 100644 --- a/src/mqtt_client.erl +++ b/src/mqtt_client.erl @@ -613,7 +613,7 @@ handle_info({mqtt, disconnected}, State) -> Fun when is_function(Fun) -> spawn(fun() -> Fun(Self) end) end, - {noreply, State}; + {noreply, State#state{pending_publishes = #{}, pending_subscriptions = #{}, pending_unsubscriptions = #{}, subscriber_map = #{}}}; handle_info({mqtt, error, Error}, State) -> ?TRACE("handle_info({mqtt, disconnected}~n", []), Config = State#state.config,