You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ei...@apache.org on 2019/10/29 18:14:07 UTC

[couchdb] 01/01: Pass timeout as an error to callback in fabric_view_all_docs

This is an automated email from the ASF dual-hosted git repository.

eiri pushed a commit to branch fix-all_docs-timeout-error
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit c67dfaa413824aa64610e683568295c528064e73
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Tue Oct 29 15:13:23 2019 -0300

    Pass timeout as an error to callback in fabric_view_all_docs
---
 src/fabric/src/fabric_view_all_docs.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/fabric/src/fabric_view_all_docs.erl b/src/fabric/src/fabric_view_all_docs.erl
index 5fe1437..07cd1b1 100644
--- a/src/fabric/src/fabric_view_all_docs.erl
+++ b/src/fabric/src/fabric_view_all_docs.erl
@@ -111,12 +111,12 @@ go(DbName, Options, QueryArgs, Callback, Acc0) ->
                 {ok, Acc2} ->
                     Callback(complete, Acc2);
                 timeout ->
-                    Callback(timeout, Acc0)
+                    Callback({error, timeout}, Acc0)
             end;
         {'DOWN', Ref, _, _, Error} ->
             Callback({error, Error}, Acc0)
     after Timeout ->
-        Callback(timeout, Acc0)
+        Callback({error, timeout}, Acc0)
     end.
 
 go(DbName, _Options, Workers, QueryArgs, Callback, Acc0) ->