diff options
author | Loïc Hoguin <[email protected]> | 2015-04-09 18:29:18 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-04-09 18:29:18 +0300 |
commit | 2badb594bdedfd1283306fe2075c2c51abdd600d (patch) | |
tree | 988dc0091df1484a4efcb62c60d16fa0a74f9ddf /src/gun.erl | |
parent | bcb218ef7758dff5e7a74be7cab282719844c8a5 (diff) | |
download | gun-2badb594bdedfd1283306fe2075c2c51abdd600d.tar.gz gun-2badb594bdedfd1283306fe2075c2c51abdd600d.tar.bz2 gun-2badb594bdedfd1283306fe2075c2c51abdd600d.zip |
Fix checking of protocol options
map:to_list -> maps:to_list
Only call maps:to_list once.
Diffstat (limited to 'src/gun.erl')
-rw-r--r-- | src/gun.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gun.erl b/src/gun.erl index e5bbd7e..4bb2806 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -128,7 +128,7 @@ open(Host, Port, Opts) when is_list(Host); is_atom(Host) -> check_options([]) -> ok; check_options([{http_opts, ProtoOpts}|Opts]) when is_map(ProtoOpts) -> - case gun_http:check_options(map:to_list(ProtoOpts)) of + case gun_http:check_options(ProtoOpts) of ok -> check_options(Opts); Error -> @@ -153,7 +153,7 @@ check_options([{retry, R}|Opts]) when is_integer(R), R >= 0 -> check_options([{retry_timeout, T}|Opts]) when is_integer(T) > 0 -> check_options(Opts); check_options([{spdy_opts, ProtoOpts}|Opts]) when is_map(ProtoOpts) -> - case gun_spdy:check_options(map:to_list(ProtoOpts)) of + case gun_spdy:check_options(ProtoOpts) of ok -> check_options(Opts); Error -> |