You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2019/12/05 19:35:37 UTC
[couchdb] 04/11: Fix bug in fabric2_events
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch opentracing-davisp
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 3b76d6edcd29b0ee1ecfacd7b22fd61d0fad8bab
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Mon Nov 4 16:19:45 2019 -0600
Fix bug in fabric2_events
---
src/fabric/src/fabric2_events.erl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/fabric/src/fabric2_events.erl b/src/fabric/src/fabric2_events.erl
index 094ca2f..7c24d98 100644
--- a/src/fabric/src/fabric2_events.erl
+++ b/src/fabric/src/fabric2_events.erl
@@ -62,7 +62,7 @@ poll(DbName, Since, Mod, Fun, St) ->
exit(Error)
end
catch error:database_does_not_exist ->
- Mod:Fun(DbName, deleted, St)
+ {Mod:Fun(DbName, deleted, St), deleted}
end,
receive
stop_listening ->
@@ -71,9 +71,11 @@ poll(DbName, Since, Mod, Fun, St) ->
ok
after 0 ->
case Resp of
- {ok, NewSt} ->
+ {ok, NewSt} when NewSince /= deleted ->
timer:sleep(1000),
?MODULE:poll(DbName, NewSince, Mod, Fun, NewSt);
+ {ok, _} when NewSince == deleted ->
+ ok;
{stop, _} ->
ok
end