Skip to content

Commit

Permalink
Fix Dialyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Aug 17, 2023
1 parent e7c9143 commit 96303f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,11 @@ jobs:

test:
name: >-
Test (
Elixir ${{ matrix.elixir }},
Test (Elixir ${{ matrix.elixir }},
OTP ${{ matrix.otp }},
C* ${{ matrix.server_versions.cassandra }},
Scylla ${{ matrix.server_versions.scylla }},
Native protocol ${{ matrix.cassandra_native_protocol }}
)
Native protocol ${{ matrix.cassandra_native_protocol }})
runs-on: ubuntu-20.04

Expand Down
5 changes: 4 additions & 1 deletion lib/xandra/cluster/control_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ defmodule Xandra.Cluster.ControlConnection do
else
{:error, {:use_this_protocol_instead, _failed_protocol_version, proto_vsn}} ->
state = update_in(state.transport, &Transport.close/1)
state = put_in(state.connection_options[:protocol_version], proto_vsn)

state =
update_in(state.connection_options, &Keyword.put(&1, :protocol_version, proto_vsn))

connect(state)

{:error, reason} ->
Expand Down
3 changes: 2 additions & 1 deletion lib/xandra/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ defmodule Xandra.Connection do
send(state.cluster_pid, {:xandra, :disconnected, state.peername, self()})
end

:ok = Transport.close(state.transport)
_transport = Transport.close(state.transport)
:ok
end

@impl true
Expand Down

0 comments on commit 96303f0

Please sign in to comment.