Explorar o código

fix: no clear persistent_term: channels

yr %!s(int64=2) %!d(string=hai) anos
pai
achega
1e74b60922
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/emqx_plugin_kafka_producer.erl

+ 1 - 0
src/emqx_plugin_kafka_producer.erl

@@ -75,6 +75,7 @@ on_stop(_InstId, #{client_id := ClientId, channels := Channels}) ->
     }),
     }),
     maps:foreach(fun(_, ChannelState) -> remove_producers(ClientId, ChannelState) end, Channels),
     maps:foreach(fun(_, ChannelState) -> remove_producers(ClientId, ChannelState) end, Channels),
     deallocate_client(ClientId),
     deallocate_client(ClientId),
+    persistent_term:erase({?EMQX_PLUGIN_KAFKA_APP, ?EMQX_PLUGIN_KAFKA_CHANNELS}),
     ok.
     ok.
 
 
 on_add_channel(
 on_add_channel(