Skip to content

Commit

Permalink
Issue #6603 - HTTP/2 max local stream count exceeded
Browse files Browse the repository at this point in the history
Made newEntry() private to avoid creation of more than 2 Entry subclasses.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Aug 30, 2021
1 parent 97f4ef3 commit aa3e7de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jetty-util/src/main/java/org/eclipse/jetty/util/Pool.java
Expand Up @@ -353,8 +353,10 @@ public Entry reserve()
}
}

protected Entry newEntry()
private Entry newEntry()
{
// Do not allow more than 2 implementations of Entry, otherwise call sites in Pool
// referencing Entry methods will become mega-morphic and kill the performance.
if (maxMultiplex >= 0 || maxUsage >= 0)
return new MultiEntry();
return new MonoEntry();
Expand Down

0 comments on commit aa3e7de

Please sign in to comment.