Skip to content

Commit

Permalink
Fix timeout handling in Postgrex.SimpleConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Apr 13, 2023
1 parent 0b73cfa commit 5b8283a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/postgrex/simple_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ defmodule Postgrex.SimpleConnection do
handle(mod, :handle_call, [msg, callback_from, mod_state], from, state)
end

def handle_event(:info, :timeout, @state, %{protocol: protocol} = state) do
def handle_event(:timeout, nil, @state, %{protocol: protocol} = state) do
case Protocol.ping(protocol) do
{:ok, protocol} ->
{:keep_state, %{state | protocol: protocol}, {:timeout, state.idle_interval, nil}}
Expand Down

0 comments on commit 5b8283a

Please sign in to comment.