obmarg / kazan

Kubernetes API client for Elixir
https://hex.pm/packages/kazan
MIT License
140 stars 35 forks source link

Terminate Watcher if send_to process terminates #46

Closed chazsconi closed 6 years ago

chazsconi commented 6 years ago

If the process that the watcher is sending to dies (the consumer), then the watcher is left orphaned.

Therefore, this monitors the consumer, and when the consumer dies, terminates the async connection and then terminates itself.

obmarg commented 6 years ago

Nice one @chazsconi - this looks good. Could we get a small unit test?

chazsconi commented 6 years ago

Test added :)

obmarg commented 6 years ago

Awesome - thanks for that. Probably going to hold off till we've got a fix for #45 before releasing, but let me know if you need it before then. I don't mind making 2 seperate releases.

chazsconi commented 6 years ago

Thanks! No hurry.