Skip to content

Commit d892f26

Browse files
committed
PR comments
1 parent e82d8e1 commit d892f26

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

lib/hpax/table.ex

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,15 +271,8 @@ defmodule HPAX.Table do
271271
current -> min(current, new_protocol_max_table_size)
272272
end
273273

274-
table =
275-
if new_protocol_max_table_size < table.size do
276-
evict_to_size(table, new_protocol_max_table_size)
277-
else
278-
table
279-
end
280-
281274
%__MODULE__{
282-
table
275+
evict_to_size(table, new_protocol_max_table_size)
283276
| protocol_max_table_size: new_protocol_max_table_size,
284277
max_table_size: new_protocol_max_table_size,
285278
pending_minimum_resize: pending_minimum_resize

test/hpax/table_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ defmodule HPAX.TableTest do
7070
end
7171
end
7272

73-
describe "resize/2" do
73+
describe "resizing" do
7474
test "increasing the protocol max table size" do
7575
table = Table.new(4096, :never)
7676
table = Table.add(table, "aaaa", "AAAA")
@@ -100,7 +100,7 @@ defmodule HPAX.TableTest do
100100
end
101101
end
102102

103-
describe "dynamic_resize/2" do
103+
describe "dynamically resizing" do
104104
test "decreasing the max table size but above table size" do
105105
table = Table.new(4096, :never)
106106
table = Table.add(table, "aaaa", "AAAA")

0 commit comments

Comments
 (0)