mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2024-11-20 13:59:55 +01:00
ConnectionPool.Worker: do not stop with an error when there is a timeout
This produced error log messages about GenServer termination every time the connection was not open due to a timeout. Instead we stop with `{:shutdown, <gun_error>}` since shutting down when the connection can't be established is normal behavior.
This commit is contained in:
parent
6d583bcc3b
commit
7115c5f82e
2 changed files with 5 additions and 2 deletions
|
@ -53,7 +53,10 @@ defmodule Pleroma.Gun.ConnectionPool do
|
|||
{:ok, pid}
|
||||
|
||||
{:DOWN, ^ref, :process, ^worker_pid, reason} ->
|
||||
{:error, reason}
|
||||
case reason do
|
||||
{:shutdown, error} -> error
|
||||
_ -> {:error, reason}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ defmodule Pleroma.Gun.ConnectionPool.Worker do
|
|||
:hibernate}
|
||||
else
|
||||
err ->
|
||||
{:stop, err, nil}
|
||||
{:stop, {:shutdown, err}, nil}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue