Skip to content

Instantly share code, notes, and snippets.

@rnewson
Created September 12, 2014 08:35
Show Gist options
  • Save rnewson/d7bbe1d32e91103ce6c9 to your computer and use it in GitHub Desktop.
Save rnewson/d7bbe1d32e91103ce6c9 to your computer and use it in GitHub Desktop.
Don't swallow other people's replies
diff --git a/src/fabric_util.erl b/src/fabric_util.erl
index d0b4ac9..f292621 100644
--- a/src/fabric_util.erl
+++ b/src/fabric_util.erl
@@ -184,7 +184,7 @@ get_shard([#shard{node = Node, name = Name} | Rest], Opts, Timeout, Factor) ->
{ok, Db};
{Ref, {ok, {unauthorized, _} = Error}} ->
throw(Error);
- _Else ->
+ {Ref, _Else} ->
get_shard(Rest, Opts, Timeout, Factor)
after Timeout ->
get_shard(Rest, Opts, Factor * Timeout, Factor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment