diff --git a/lib/xandra/connection.ex b/lib/xandra/connection.ex index d5ea26b1..fd678460 100644 --- a/lib/xandra/connection.ex +++ b/lib/xandra/connection.ex @@ -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 @@ -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