meh/reagent

Terminate error

Closed this issue · 0 comments

I get the following error:

** (UndefinedFunctionError) function :shutdown.socket/0 is undefined (module :shutdown is not available)
    :shutdown.socket()
    (reagent) lib/reagent/listener.ex:159: Reagent.Listener.terminate/2
    (stdlib) gen_server.erl:629: :gen_server.try_terminate/3
    (stdlib) gen_server.erl:795: :gen_server.terminate/7
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:EXIT, #PID<0.1343.0>, :shutdown}

The lines

  def terminate(self, _) do
    self.socket |> Socket.close
  end

should be

  def terminate(_reason, self) do
    self.socket |> Socket.close
  end

I'll submit a PR