You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2019/07/31 16:56:07 UTC

[couchdb] 17/34: Fix arity in changes timeout callback

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

davisp pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 920e1ffbce2ba0b0fedb65cfabd334770016d0fe
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Thu Jun 20 10:42:30 2019 -0300

    Fix arity in changes timeout callback
---
 src/chttpd/src/chttpd_auth_cache.erl | 2 +-
 src/chttpd/src/chttpd_changes.erl    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/chttpd/src/chttpd_auth_cache.erl b/src/chttpd/src/chttpd_auth_cache.erl
index d947fe6..fc1ee62 100644
--- a/src/chttpd/src/chttpd_auth_cache.erl
+++ b/src/chttpd/src/chttpd_auth_cache.erl
@@ -176,7 +176,7 @@ changes_callback({change, {Change}}, _) ->
             ets_lru:remove(?CACHE, UserName)
     end,
     {ok, couch_util:get_value(seq, Change)};
-changes_callback(timeout, Acc) ->
+changes_callback({timeout, _ResponseType}, Acc) ->
     {ok, Acc};
 changes_callback({error, _}, EndSeq) ->
     exit({seq, EndSeq}).
diff --git a/src/chttpd/src/chttpd_changes.erl b/src/chttpd/src/chttpd_changes.erl
index d27bbad..0e03482 100644
--- a/src/chttpd/src/chttpd_changes.erl
+++ b/src/chttpd/src/chttpd_changes.erl
@@ -485,10 +485,10 @@ get_changes_timeout(Args, Callback) ->
         end;
     true ->
         {DefaultTimeout,
-            fun(UserAcc) -> {ok, Callback(timeout, ResponseType, UserAcc)} end};
+            fun(UserAcc) -> {ok, Callback({timeout, ResponseType}, UserAcc)} end};
     _ ->
         {lists:min([DefaultTimeout, Heartbeat]),
-            fun(UserAcc) -> {ok, Callback(timeout, ResponseType, UserAcc)} end}
+            fun(UserAcc) -> {ok, Callback({timeout, ResponseType}, UserAcc)} end}
     end.
 
 start_sending_changes(Callback, UserAcc) ->