diff --git a/lib/postgrex/replication_connection.ex b/lib/postgrex/replication_connection.ex index ff931941..11c21613 100644 --- a/lib/postgrex/replication_connection.ex +++ b/lib/postgrex/replication_connection.ex @@ -474,7 +474,7 @@ defmodule Postgrex.ReplicationConnection do case handle_event(:internal, {:connect, :init}, @state, state) do {:keep_state, state} -> {:ok, @state, state} {:keep_state, state, actions} -> {:ok, @state, state, actions} - {:stop, _reason, _state} = stop -> stop + {:stop, reason, _state} -> {:stop, reason} end else {:ok, @state, state, {:next_event, :internal, {:connect, :init}}} diff --git a/lib/postgrex/simple_connection.ex b/lib/postgrex/simple_connection.ex index 62ac8fae..abb16d93 100644 --- a/lib/postgrex/simple_connection.ex +++ b/lib/postgrex/simple_connection.ex @@ -325,7 +325,7 @@ defmodule Postgrex.SimpleConnection do case handle_event(:internal, {:connect, :init}, @state, state) do {:keep_state, state} -> {:ok, @state, state} {:keep_state, state, actions} -> {:ok, @state, state, actions} - {:stop, _reason, _state} = stop -> stop + {:stop, reason, _state} -> {:stop, reason} end else {:ok, @state, state, {:next_event, :internal, {:connect, :init}}}