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 21, 2024
1 parent 7cb3eb7 commit 5958a58
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 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 @@ -342,7 +343,7 @@ accept_one(Family, Socket, NetKernel) ->
case
ssl:handshake(
Socket,
trace([{active, false},{packet, 4}|Opts]),
trace([{active, false}, {packet, 4} | Opts]),
net_kernel:connecttime())
of
{ok, SslSocket} ->
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 5958a58

Please sign in to comment.