Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit bfbe7e4

Browse files
committed
fix
1 parent babe134 commit bfbe7e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/etcd_sets.erl

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ add(Url, Key, Value, Timeout) ->
3737
add(Url, Key, Value, TTL, Timeout) ->
3838
{ok, Exists} = exists(Url, Key, Timeout),
3939
case Exists of
40-
not_exists -> etcd:set(Url, get_head_key(Key), "1", Timeout)
40+
not_exists -> etcd:set(Url, get_head_key(Key), "1", Timeout);
41+
exists -> ok
4142
end,
4243
MemberKey = io_lib:format("~s/~s", [Key, hash(Value)]),
4344
Result = etcd:set(Url, MemberKey, Value, TTL, Timeout),

0 commit comments

Comments
 (0)