couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [28/35] git commit: Fix compilation warning by sending not_registered
Date Fri, 01 Aug 2014 09:10:24 GMT
Fix compilation warning by sending not_registered


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/commit/2bb6b744
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/tree/2bb6b744
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/diff/2bb6b744

Branch: refs/heads/windsor-merge
Commit: 2bb6b744636b83fa728ee4ab7a8bed62bcbcd11d
Parents: 6b82918
Author: Adam Kocoloski <adam@cloudant.com>
Authored: Fri May 24 14:10:49 2013 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Jul 30 17:47:49 2014 +0100

----------------------------------------------------------------------
 src/couch_event_server.erl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/blob/2bb6b744/src/couch_event_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_event_server.erl b/src/couch_event_server.erl
index 77e6ce3..866bf7c 100644
--- a/src/couch_event_server.erl
+++ b/src/couch_event_server.erl
@@ -66,14 +66,15 @@ handle_call({register, Pid, NewDbNames}, _From, St) ->
     {reply, ok, St};
 
 handle_call({unregister, Pid}, _From, St) ->
-    case khash:get(St#st.by_pid, Pid) of
+    Reply = case khash:get(St#st.by_pid, Pid) of
         undefined ->
-            {reply, not_registered, St};
+            not_registered;
         {Ref, OldDbNames} ->
             unregister(St, Pid, OldDbNames),
-            erlang:demonitor(Ref, [flush])
+            erlang:demonitor(Ref, [flush]),
+            ok
     end,
-    {reply, ok, St};
+    {reply, Reply, St};
 
 handle_call(Msg, From, St) ->
     couch_log:notice("~s ignoring call ~w from ~w", [?MODULE, Msg, From]),
@@ -151,4 +152,3 @@ rem_listener(ByDbName, DbName, Pid) ->
     if Size > 0 -> ok; true ->
         khash:del(ByDbName, DbName)
     end.
-            


Mime
View raw message