Skip to content

Commit

Permalink
fix: request exact stream max if infinite
Browse files Browse the repository at this point in the history
Previously set to 1 billion. Might accidentally create a case where
the connection is still valid, but streams no longer dispatch.
  • Loading branch information
hpopp committed Oct 13, 2018
1 parent 0bd6281 commit 049d8a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/connection/processor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,8 @@ defmodule Kadabra.Connection.Processor do
end

defp request_more_streams(:infinite, state) do
# A client can request slightly more than this on a
# connection, but let's be conservative.
request_more_streams(1_000_000_000, state)
# Any more than this and you exhaust usable stream identifiers
request_more_streams(1_073_741_823, state)
end

defp request_more_streams(max_count, state) do
Expand Down

0 comments on commit 049d8a6

Please sign in to comment.