Skip to content

Commit

Permalink
docs: update GenServer example
Browse files Browse the repository at this point in the history
  • Loading branch information
tlux committed Mar 31, 2024
1 parent 9fbf938 commit 8db373e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/gen_server.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ defmodule EventLogger do

@impl true
def handle_info(
{:DOWN, monitor, :process, socket, :normal},
{:DOWN, monitor, :process, socket, reason},
%{monitor: monitor, socket: socket} = state
) do
IO.puts("Socket closed")
{:stop, :normal, %{state | socket: nil, subscription_id: nil}}
{:stop, reason, %{state | socket: nil, subscription_id: nil}}
end

def handle_info(
Expand Down

0 comments on commit 8db373e

Please sign in to comment.