Skip to content

Commit

Permalink
Remove tracking of remote max_concurrent_streams
Browse files Browse the repository at this point in the history
This should have actually come out as part of #33 but was missed
  • Loading branch information
mtrudel committed Oct 10, 2023
1 parent f494b5d commit 9ace314
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion lib/bandit/http2/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ defmodule Bandit.HTTP2.Connection do
streams =
connection.streams
|> StreamCollection.update_initial_send_window_size(frame.settings.initial_window_size)
|> StreamCollection.update_max_concurrent_streams(frame.settings.max_concurrent_streams)

send_hpack_state = HPAX.resize(connection.send_hpack_state, frame.settings.header_table_size)

Expand Down
7 changes: 0 additions & 7 deletions lib/bandit/http2/stream_collection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ defmodule Bandit.HTTP2.StreamCollection do

defstruct initial_recv_window_size: 65_535,
initial_send_window_size: 65_535,
max_concurrent_streams: :infinity,
last_local_stream_id: 0,
last_remote_stream_id: 0,
stream_count: 0,
Expand All @@ -20,17 +19,11 @@ defmodule Bandit.HTTP2.StreamCollection do
@type t :: %__MODULE__{
initial_recv_window_size: non_neg_integer(),
initial_send_window_size: non_neg_integer(),
max_concurrent_streams: non_neg_integer() | :infinity,
last_remote_stream_id: Stream.stream_id(),
last_local_stream_id: Stream.stream_id(),
streams: %{Stream.stream_id() => Stream.t()}
}

@spec update_max_concurrent_streams(t(), non_neg_integer()) :: t()
def update_max_concurrent_streams(collection, max_concurrent_streams) do
%{collection | max_concurrent_streams: max_concurrent_streams}
end

@spec update_initial_send_window_size(t(), non_neg_integer()) :: t()
def update_initial_send_window_size(collection, initial_send_window_size) do
delta = initial_send_window_size - collection.initial_send_window_size
Expand Down

0 comments on commit 9ace314

Please sign in to comment.