Browse Source

fix: no clear persistent_term: channels

yr 2 năm trước cách đây
mục cha
commit
1e74b60922
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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),
     deallocate_client(ClientId),
+    persistent_term:erase({?EMQX_PLUGIN_KAFKA_APP, ?EMQX_PLUGIN_KAFKA_CHANNELS}),
     ok.
 
 on_add_channel(