aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-10-26 10:16:15 +0200
committerLoïc Hoguin <[email protected]>2018-10-26 10:16:15 +0200
commit331084911589a0195dc0eaf9e781a29509232bc6 (patch)
tree66eca1994925cf677ab59662a34854a4cb6595ba /src/cowboy.erl
parent497e9d459e961b9d807b0543dbb1635551ce75b8 (diff)
downloadcowboy-331084911589a0195dc0eaf9e781a29509232bc6.tar.gz
cowboy-331084911589a0195dc0eaf9e781a29509232bc6.tar.bz2
cowboy-331084911589a0195dc0eaf9e781a29509232bc6.zip
Simplify a case clause
Diffstat (limited to 'src/cowboy.erl')
-rw-r--r--src/cowboy.erl5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cowboy.erl b/src/cowboy.erl
index 7a09606..a046199 100644
--- a/src/cowboy.erl
+++ b/src/cowboy.erl
@@ -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">>]}