Skip to content

Commit

Permalink
release stream id
Browse files Browse the repository at this point in the history
  • Loading branch information
harunzengin committed Feb 19, 2024
1 parent bc22c4a commit 0bac294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xandra/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ defmodule Xandra.Connection do
end

def disconnected(:cast, {:release_stream_id, stream_id}, %__MODULE__{} = data) do
data = update_in(data.free_stream_ids, &MapSet.put(&1, stream_id))
data = update_in(data.in_flight_requests, &Map.delete(&1, stream_id))
{:keep_state, data}
end
Expand Down Expand Up @@ -629,7 +630,6 @@ defmodule Xandra.Connection do
def connected(:cast, {:timed_out_id, stream_id}, %__MODULE__{} = data) do
data = update_in(data.in_flight_requests, &Map.delete(&1, stream_id))
data = update_in(data.timed_out_ids, &MapSet.put(&1, stream_id))

{:keep_state, data}
end

Expand Down

0 comments on commit 0bac294

Please sign in to comment.