Skip to content

Commit c0d7181

Browse files
authored
Merge pull request #54 from gilbertwong96/hotfix/resiliency
Fix resiliency in connect_all mode
2 parents bca0c9b + 73472ed commit c0d7181

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/eetcd.app.src

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{application, eetcd,
22
[
33
{description, "ETCD V3 client"},
4-
{vsn, "0.3.5"},
4+
{vsn, "0.3.6"},
55
{registered, [eetcd_sup, eetcd_conn_sup, eetcd_lease_sup]},
66
{mod, {eetcd_app, []}},
77
{applications, [kernel, stdlib, gun]},
88
{env, []},
99
{modules, []},
10-
10+
1111
{licenses, ["Apache 2.0"]},
1212
{links, [{"Github", "https://github.com/zhongwencool/eetcd"}]}
1313
]

src/eetcd_conn.erl

+3-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,9 @@ do_check_health(connect_all, Data) ->
416416
{Health, [{Host, ?MIN_RECONN} | Freeze]}
417417
end
418418
end, {[], Freezes}, Actives),
419-
NewFreezes1 = [{H1, P1} || {H1, P1} <- NewFreezes, {H2, P2} <- Members, H1 =:= H2, P1 =:= P2],
419+
NewFreezes1 = [{{H1, P1}, RECONN} || {{H1, P1}, RECONN} <- NewFreezes,
420+
{H2, P2} <- Members,
421+
H1 =:= H2, P1 =:= P2],
420422
Data#{active_conns => NewActives, freeze_conns => NewFreezes1};
421423
do_check_health(random, Data) ->
422424
#{name := Name, active_conns := ActiveConns} = Data,

0 commit comments

Comments
 (0)