tres/switch_registry: Fix undef error

This commit is contained in:
Eishun Kondoh 2018-10-07 23:50:49 +09:00
parent 910c6ee255
commit f7a21ae9b1
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View file

@ -9,6 +9,7 @@ defmodule Tres.SwitchRegistry do
case Registry.register(Tres.HandlerRegistry, datapath_id, pid) do
{:ok, _owner} ->
:ok
{:error, {:already_registered, _owner}} ->
:ok
end
@ -22,7 +23,7 @@ defmodule Tres.SwitchRegistry do
end
def lookup_handler_pid(datapath_id) when is_binary(datapath_id),
do: lookup_handler({datapath_id, 0})
do: lookup_handler_pid({datapath_id, 0})
# For Datapath