ConnectionPool: fix gun open errors being returned without an error tuple
authorrinpatch <rinpatch@sdf.org>
Sat, 1 Aug 2020 14:59:50 +0000 (17:59 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 1 Aug 2020 15:02:26 +0000 (18:02 +0300)
commit45be1fe00e93fadab27a8e93e4537f11f6edd5eb
tree845d5caee4ad9cf1c4b9fa4d6066b17d4cfbd5a8
parent3a6a4dd77aca3d423b92405e9cdbffca51b98bd3
ConnectionPool: fix gun open errors being returned without an error tuple

When gun shuts down due to the host being unreachable, the worker
process shuts down with the same shutdown reason since they are linked.
Gun doesn't have error tuples in it's shutdown reason though, so we need
to handle it in get_conn.

Closes #2008
lib/pleroma/gun/connection_pool.ex