couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [04/10] git commit: This was a silly off-by-one error while counting
Date Thu, 07 Aug 2014 16:01:06 GMT
This was a silly off-by-one error while counting

The start message doesn't count as a row so we don't want to adjust
Acc#acc.limit based on that message.

BugzId: 26165


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/129b7c17
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/129b7c17
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/129b7c17

Branch: refs/heads/windsor-merge
Commit: 129b7c17e12752508004b3af4b548e48f981bd2d
Parents: d58fce1
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Fri Dec 13 14:38:23 2013 -0600
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Aug 7 17:00:36 2014 +0100

----------------------------------------------------------------------
 src/global_changes_httpd.erl | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/129b7c17/src/global_changes_httpd.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_httpd.erl b/src/global_changes_httpd.erl
index 869f3bc..a012cc3 100644
--- a/src/global_changes_httpd.erl
+++ b/src/global_changes_httpd.erl
@@ -135,12 +135,11 @@ changes_callback(start, Acc) ->
     #acc{resp=Req} = Acc,
     FirstChunk = "{\"results\":[\n",
     {ok, Resp} = chttpd:start_delayed_json_response(Req, 200, [], FirstChunk),
-    Acc1 = Acc#acc{
+    {ok, Acc#acc{
         resp=Resp,
         prepend="",
         last_data_sent_time=os:timestamp()
-    },
-    maybe_finish(Acc1);
+    }};
 changes_callback({change, Change0}, Acc) ->
     #acc{resp=Resp, prepend=Prepend, username=Username} = Acc,
     case transform_change(Username, Resp, Change0) of


Mime
View raw message