couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [10/10] git commit: Make changes_callback end request when limit=1
Date Thu, 07 Aug 2014 16:01:12 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/c0f03829
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/c0f03829
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/c0f03829

Branch: refs/heads/windsor-merge
Commit: c0f03829df9444c72e3b5c73143d2ada3f3ca0e2
Parents: 129b7c1
Author: Benjamin Bastian <benjamin.bastian@gmail.com>
Authored: Fri Dec 13 14:31:30 2013 -0800
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Aug 7 17:00:36 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/c0f03829/src/global_changes_httpd.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_httpd.erl b/src/global_changes_httpd.erl
index a012cc3..a5c9250 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