Skip to content

Commit

Permalink
chore: fix compile warning, an unused var
Browse files Browse the repository at this point in the history
  • Loading branch information
zmstone committed Nov 13, 2024
1 parent b828486 commit 55ff2e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/esockd_acceptor_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
-export([tune_socket/2]).

%% Test
-export([tune_socket_fun/2]).
-export([tune_socket_fun/1]).

-define(ACCEPTOR_POOL, 16).

Expand All @@ -46,7 +46,7 @@
start_supervised(ListenerRef = {Proto, ListenOn}) ->
Type = esockd_server:get_listener_prop(ListenerRef, type),
Opts = esockd_server:get_listener_prop(ListenerRef, options),
TuneFun = tune_socket_fun(Type, Opts),
TuneFun = tune_socket_fun(Opts),
UpgradeFuns = upgrade_funs(Type, Opts),
LimiterOpts = esockd_listener_sup:conn_limiter_opts(Opts, {listener, Proto, ListenOn}),
Limiter = esockd_listener_sup:conn_rate_limiter(LimiterOpts),
Expand Down Expand Up @@ -107,7 +107,7 @@ init({AcceptorMod, AcceptorArgs}) ->
%% Internal functions
%% -------------------------------------------------------------------

tune_socket_fun(Type, Opts) ->
tune_socket_fun(Opts) ->
Opts1 = case proplists:get_bool(tune_buffer, Opts) of
true ->
[{tune_buffer, true}];
Expand Down
2 changes: 1 addition & 1 deletion test/esockd_acceptor_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ start(PortNumber, Limiter, Opts) ->
{nodelay, true},
{backlog, maps:get(backlog, Opts, 1024)}],
{ok, ListenSocket} = gen_tcp:listen(PortNumber, SockOpts),
TuneFun = maps:get(tune_fun, Opts, esockd_acceptor_sup:tune_socket_fun(tcp, [])),
TuneFun = maps:get(tune_fun, Opts, esockd_acceptor_sup:tune_socket_fun([])),
StartConn = {fun ?MODULE:start_connection/3, [Opts]},
{ok, AccPid} = esockd_acceptor:start_link(tcp, PortNumber, StartConn, TuneFun, _UpFuns = [], Limiter, ListenSocket),
#{lsock => ListenSocket, acceptor => AccPid}.
Expand Down

0 comments on commit 55ff2e7

Please sign in to comment.