Skip to content

Commit

Permalink
Use read_ahead in SSL for KTLS
Browse files Browse the repository at this point in the history
  • Loading branch information
RaimoNiskanen committed Aug 30, 2024
1 parent 7cb3eb7 commit 1134284
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/ssl/src/inet_tls_dist.erl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2011-2023. All Rights Reserved.
%% Copyright Ericsson AB 2011-2024. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -233,7 +233,8 @@ listen(Name, Host) ->

fam_listen(Family, Name, Host) ->
ForcedOptions =
[Family, {active, false}, {packet, 4}, {nodelay, true}],
[Family, {active, false}, {packet, 4},
{read_ahead, false}, {nodelay, true}],
ListenFun =
fun (First, Last, ListenOptions) ->
listen_loop(
Expand Down Expand Up @@ -640,7 +641,8 @@ do_setup(
inet_tcp_dist:merge_options(
ConnectOptions,
get_ssl_options(client)),
[Family, binary, {active, false}, {packet, 4}, {nodelay, true}],
[Family, binary, {active, false}, {packet, 4},
{read_ahead, false}, {nodelay, true}],
[{server_name_indication, Host}]),
KTLS = proplists:get_value(ktls, Opts, false),
dist_util:reset_timer(Timer),
Expand Down

0 comments on commit 1134284

Please sign in to comment.