Skip to content

Commit

Permalink
Set connection transport buffer for active socket
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethito committed Apr 16, 2024
1 parent 077cc5f commit 071382a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/xandra/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ defmodule Xandra.Connection do
@behaviour :gen_statem

@forced_transport_options [packet: :raw, mode: :binary, active: false]
@default_transport_options [buffer: 1_000_000]

# How old a timed-out stream ID can be before we flush it.
@max_timed_out_stream_id_age_in_millisec :timer.minutes(5)
Expand Down Expand Up @@ -410,6 +411,7 @@ defmodule Xandra.Connection do
options:
options
|> Keyword.get(:transport_options, [])
|> Keyword.put_new(@default_transport_options)
|> Keyword.merge(@forced_transport_options)
}

Expand Down

0 comments on commit 071382a

Please sign in to comment.