nickva commented on a change in pull request #3568:
URL: https://github.com/apache/couchdb/pull/3568#discussion_r633807677



##########
File path: src/chttpd/src/chttpd_auth_cache.erl
##########
@@ -128,35 +137,38 @@ handle_call(reinit_cache, _From, State) ->
     self() ! {start_listener, 0},
 
     {reply, ok, State#state{changes_pid = undefined}};
-
 handle_call(_Call, _From, State) ->
     {noreply, State}.
 
 handle_cast(_Msg, State) ->
     {noreply, State}.
 
-handle_info({'DOWN', _, _, Pid, Reason}, #state{changes_pid=Pid} = State) ->
-    Seq = case Reason of
-        {seq, EndSeq} ->
-            EndSeq;
-    {database_does_not_exist, _} ->
-            ?LOG_NOTICE(#{
-                what => changes_listener_died,
-                reason => database_does_not_exist,
-                details => "create the _users database to silence this notice"
-            }),
-            couch_log:notice("~p changes listener died because the _users 
database does not exist. Create the database to silence this notice.", 
[?MODULE]),
-            0;
-        _ ->
-            ?LOG_NOTICE(#{
-                what => changes_listener_died,
-                reason => Reason
-            }),
-            couch_log:notice("~p changes listener died ~r", [?MODULE, Reason]),
-            0
-    end,
+handle_info({'DOWN', _, _, Pid, Reason}, #state{changes_pid = Pid} = State) ->
+    Seq =
+        case Reason of
+            {seq, EndSeq} ->
+                EndSeq;
+            {database_does_not_exist, _} ->
+                ?LOG_NOTICE(#{
+                    what => changes_listener_died,
+                    reason => database_does_not_exist,
+                    details => "create the _users database to silence this 
notice"
+                }),
+                couch_log:notice(
+                    "~p changes listener died because the _users database does 
not exist. Create the database to silence this notice.",
+                    [?MODULE]
+                ),
+                0;
+            _ ->
+                ?LOG_NOTICE(#{

Review comment:
       From what I understand it tries to keep to the existing style in the 
surrounding code. That might explain why it acts differently in different 
sections of code.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to