Explorar el Código

fix: no clear persistent_term: channels

yr hace 2 años
padre
commit
1e74b60922
Se han modificado 1 ficheros con 1 adiciones y 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(