Skip to content

Commit

Permalink
Fix: mistakenly used GunOpts as proplist when it's actually a map.
Browse files Browse the repository at this point in the history
  • Loading branch information
balena committed Apr 8, 2022
1 parent 40acb27 commit f8faa6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/eetcd_conn.erl
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ fold_connect([Host | Hosts], Name, GunOpts, Auth, Ok, Fail) ->

connect(Name, {IP, Port}, GunOpts, Auth) ->
{ok, Gun} = gun:open(IP, Port, GunOpts),
Retries = proplists:get_value(retry, GunOpts),
ConnectTimeout = proplists:get_value(connect_timeout, GunOpts),
RetryTimeout = proplists:get_value(retry_timeout, GunOpts),
Retries = maps:get(retry, GunOpts),
ConnectTimeout = maps:get(connect_timeout, GunOpts),
RetryTimeout = maps:get(retry_timeout, GunOpts),
AwaitTime = (Retries + 1) * ConnectTimeout + Retries * RetryTimeout,
case gun:await_up(Gun, AwaitTime) of
{ok, http2} ->
Expand Down

0 comments on commit f8faa6b

Please sign in to comment.