sasa1977 / elixir-in-action

Code samples for Elixir in Action book
947 stars 199 forks source link

A minor type in the book (chapter 9) #10

Closed mnishiguchi closed 7 years ago

mnishiguchi commented 7 years ago

There is a typo in the code for handling :DOWN after Listing 9.2.

  def handle_info({:DOWN, _, :process, pid, _}, process_registry) do
    {:noreply, deregister_pid(new_registry, pid)} #<- new_registry should be process_registry here
  end

The code in this repo is correct: https://github.com/sasa1977/elixir-in-action/blob/master/code_samples/ch09/pool_supervision/lib/todo/process_registry.ex#L55

Thank you very much for writing such a great book!

sasa1977 commented 7 years ago

Thanks for reporting. This is already listed in the book errata, but it's always better to have a duplicate report than no report at all ;)

Glad you like the book :-)