You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/01 14:06:08 UTC
[07/11] git commit: Make changes_callback end request when limit=1
Make changes_callback end request when limit=1
Prior to this commit, the limit was hit when limit=0 by the first
changes_callback function clause. This makes maybe_finish end the
request when limit=1, so that it doesn't have to wait for another change
to end the request.
BugzID: 26166
Project: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/commit/2b2005a2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/2b2005a2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/2b2005a2
Branch: refs/heads/windsor-merge
Commit: 2b2005a247a74c811e3bb6493ac1f999bae15659
Parents: 7e3839c
Author: Benjamin Bastian <be...@gmail.com>
Authored: Fri Dec 13 14:31:30 2013 -0800
Committer: Robert Newson <rn...@apache.org>
Committed: Fri Aug 1 13:03:15 2014 +0100
----------------------------------------------------------------------
src/global_changes_httpd.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/2b2005a2/src/global_changes_httpd.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_httpd.erl b/src/global_changes_httpd.erl
index 931aa55..1ff4be9 100644
--- a/src/global_changes_httpd.erl
+++ b/src/global_changes_httpd.erl
@@ -182,7 +182,7 @@ changes_callback({error, Reason}, Acc) ->
maybe_finish(Acc) ->
case Acc#acc.limit of
- 0 ->
+ 1 ->
{stop, Acc};
undefined ->
{ok, Acc};