Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
# Minimum and maximum supported versions
versions: [{ elixir: '1.14.0', otp: '25' }, { elixir: '1.18.0', otp: '26.2.5' }]
versions: [{ elixir: '1.14.0', otp: '25' }, { elixir: '1.19.4', otp: '28' }]
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
Expand All @@ -17,4 +17,6 @@ jobs:
- run: mix deps.unlock --all # compiles and runs tests against latest versions of dependencies
- run: mix deps.get
- run: mix test
- if: matrix.versions.elixir == '1.19.4'
run: mix format --check-formatted
- run: mix dialyzer --format github
17 changes: 9 additions & 8 deletions lib/split/sockets/pool.ex
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ defmodule Split.Sockets.Pool do
def handle_checkin(checkin, _from, _old_conn, {_opts, metrics_ref} = pool_state) do
PoolMetrics.update(metrics_ref, {:connections_in_use, -1})

with {:ok, conn} <- checkin,
true <- Conn.is_open?(conn) do
{:ok, conn, pool_state}
else
_ ->
Logger.debug(
"Error checking in socket #{inspect(checkin)} to the pool. Socket is closed."
)
case checkin do
{:ok, conn} ->
{:ok, conn, pool_state}

:closed ->
{:remove, :closed, pool_state}

other ->
Logger.debug("Error checking in socket #{inspect(other)} to the pool. Socket is closed.")

{:remove, :closed, pool_state}
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ExUnit.start()

# supress logging output in the console while testing
# suppress logging output in the console while testing
# we can still capture the log output in tests using `capture_log`
Logger.configure_backend(:console, level: :error)