mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Simplify a case clause
This commit is contained in:
parent
497e9d459e
commit
3310849115
1 changed files with 1 additions and 4 deletions
|
@ -53,10 +53,7 @@ start_clear(Ref, TransOpts0, ProtoOpts0) ->
|
|||
-> {ok, pid()} | {error, any()}.
|
||||
start_tls(Ref, TransOpts0, ProtoOpts0) ->
|
||||
TransOpts1 = ranch:normalize_opts(TransOpts0),
|
||||
SocketOpts = case TransOpts1 of
|
||||
#{socket_opts := SocketOpts0} -> SocketOpts0;
|
||||
_ -> []
|
||||
end,
|
||||
SocketOpts = maps:get(socket_opts, TransOpts1, []),
|
||||
TransOpts2 = TransOpts1#{socket_opts => [
|
||||
{next_protocols_advertised, [<<"h2">>, <<"http/1.1">>]},
|
||||
{alpn_preferred_protocols, [<<"h2">>, <<"http/1.1">>]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue