forked from AkkomaGang/akkoma
removing try block in getting gun info
This commit is contained in:
parent
b34bc669b9
commit
eb324467d9
1 changed files with 7 additions and 12 deletions
|
@ -285,8 +285,6 @@ def handle_info({:DOWN, _ref, :process, conn_pid, reason}, state) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp compose_key_gun_info(pid) do
|
defp compose_key_gun_info(pid) do
|
||||||
try do
|
|
||||||
# sometimes :gun.info can raise MatchError, which lead to pool terminate
|
|
||||||
%{origin_host: origin_host, origin_scheme: scheme, origin_port: port} = Gun.info(pid)
|
%{origin_host: origin_host, origin_scheme: scheme, origin_port: port} = Gun.info(pid)
|
||||||
|
|
||||||
host =
|
host =
|
||||||
|
@ -296,9 +294,6 @@ defp compose_key_gun_info(pid) do
|
||||||
end
|
end
|
||||||
|
|
||||||
"#{scheme}:#{host}:#{port}"
|
"#{scheme}:#{host}:#{port}"
|
||||||
rescue
|
|
||||||
_ -> :error_gun_info
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp find_conn(conns, conn_pid) do
|
defp find_conn(conns, conn_pid) do
|
||||||
|
|
Loading…
Reference in a new issue