Skip to content

Commit

Permalink
Hub: call manager/1 which makes exact same call. A little more DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptChrisD committed Jan 14, 2016
1 parent 33a5e13 commit de3c762
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/hub.ex
Expand Up @@ -93,8 +93,7 @@ defmodule Nerves.Hub do
"""
def request(path, request, context \\ []) do
atomic_path = atomify(path)
{:ok, {manager_pid, _opts}} = GenServer.call(Server,
{:manager, atomic_path})
{:ok, {manager_pid, _opts}} = manager(atomic_path)
GenServer.call(manager_pid, {:request, atomic_path, request, context})
end

Expand Down

0 comments on commit de3c762

Please sign in to comment.