kafkaex / kafka_ex

Kafka client library for Elixir
MIT License
596 stars 162 forks source link

Fix deprecation warning about Supervisor.terminate_child with PID #430

Closed colinsmetz closed 3 years ago

colinsmetz commented 3 years ago

Hello!

When using KafkaEx with Elixir 1.11, this warning appears very frequently:

warning: Supervisor.terminate_child/2 with a PID is deprecated, please use DynamicSupervisor instead
  (elixir 1.11.2) lib/supervisor.ex:857: Supervisor.terminate_child/2
  (stdlib 3.14) gen_server.erl:727: :gen_server.try_terminate/3
  (stdlib 3.14) gen_server.erl:912: :gen_server.terminate/10
  (stdlib 3.14) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

This PR removes those deprecation warnings by applying the fix suggested in the message.

sourcelevel-bot[bot] commented 3 years ago

Hello, @colinsmetz! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

jbruggem commented 3 years ago

Given that the change is trivial and that all the tests passed, I'll go ahead and merge this.