We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 625b89f commit 4776530Copy full SHA for 4776530
lib/db_connection.ex
@@ -362,6 +362,15 @@ defmodule DBConnection do
362
"""
363
@callback disconnect(err :: Exception.t(), state :: any) :: :ok
364
365
+ @doc """
366
+ Optional callback for handling messages received by the connection.
367
+
368
+ Returns `{:disconnect, exception}` to close the connection or `:ok` to continue.
369
+ """
370
+ @callback handle_info(message :: any, state :: any) :: {:disconnect, Exception.t()} | :ok
371
372
+ @optional_callbacks handle_info: 2
373
374
@connection_module_key :connection_module
375
376
@doc """
0 commit comments