summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fabric/src/fabric_view_all_docs.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fabric/src/fabric_view_all_docs.erl b/src/fabric/src/fabric_view_all_docs.erl
index 1d87e3ddd..5fe143731 100644
--- a/src/fabric/src/fabric_view_all_docs.erl
+++ b/src/fabric/src/fabric_view_all_docs.erl
@@ -104,10 +104,15 @@ go(DbName, Options, QueryArgs, Callback, Acc0) ->
[{total, TotalRows}, {offset, null}, {update_seq, null}]
end,
{ok, Acc1} = Callback({meta, Meta}, Acc0),
- {ok, Acc2} = doc_receive_loop(
+ Resp = doc_receive_loop(
Keys3, queue:new(), SpawnFun, MaxJobs, Callback, Acc1
),
- Callback(complete, Acc2);
+ case Resp of
+ {ok, Acc2} ->
+ Callback(complete, Acc2);
+ timeout ->
+ Callback(timeout, Acc0)
+ end;
{'DOWN', Ref, _, _, Error} ->
Callback({error, Error}, Acc0)
after Timeout ->