Skip to content

Commit

Permalink
Add description on how to use MFA for socket drainer config
Browse files Browse the repository at this point in the history
  • Loading branch information
studzien committed Aug 8, 2023
1 parent b23be8d commit 06eaf9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/phoenix/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,12 @@ defmodule Phoenix.Endpoint do
* `:code_reloader` - enable or disable the code reloader. Defaults to your
endpoint configuration
* `:drainer` - a keyword list configuring how to drain sockets
on application shutdown. The goal is to notify all channels (and
* `:drainer` - a keyword list or a custom MFA function returning a keyword list, for example:
{MyAppWeb.Socket, :drainer_configuration, []}
configuring how to drain sockets on application shutdown.
The goal is to notify all channels (and
LiveViews) clients to reconnect. The supported options are:
* `:batch_size` - How many clients to notify at once in a given batch.
Expand Down
2 changes: 1 addition & 1 deletion lib/phoenix/socket.ex
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ defmodule Phoenix.Socket do
end
{Phoenix.Socket.PoolDrainer, {endpoint, handler, drainer}}
else
:ignore
:ignore
end
end

Expand Down

0 comments on commit 06eaf9e

Please sign in to comment.