couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [07/11] git commit: Make changes_callback end request when limit=1
Date Fri, 01 Aug 2014 12:06:08 GMT
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 <benjamin.bastian@gmail.com>
Authored: Fri Dec 13 14:31:30 2013 -0800
Committer: Robert Newson <rnewson@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};


Mime
View raw message