Skip to content

Commit

Permalink
Use cast instead of call for destroy_session
Browse files Browse the repository at this point in the history
  • Loading branch information
Kukunin committed Dec 18, 2018
1 parent af21f0f commit 18d7ce9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/hound/session_server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ defmodule Hound.SessionServer do


def destroy_sessions_for_pid(pid) do
GenServer.call(@name, {:destroy_sessions, pid}, 60000)
GenServer.cast(@name, {:destroy_sessions, pid}, 60000)
end

## Callbacks
Expand Down Expand Up @@ -87,9 +87,9 @@ defmodule Hound.SessionServer do
error -> {:reply, {:error, error}, state}
end

def handle_call({:destroy_sessions, pid}, _from, state) do
def handle_cast({:destroy_sessions, pid}, state) do
destroy_sessions(pid)
{:reply, :ok, state}
{:noreply, state}
end

def handle_info({:DOWN, ref, _, _, _}, state) do
Expand Down

0 comments on commit 18d7ce9

Please sign in to comment.