Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Fix compilation warning by sending not_registered
  • Loading branch information
kocolosk authored and rnewson committed Jul 30, 2014
1 parent 6b82918 commit 2bb6b744636b83fa728ee4ab7a8bed62bcbcd11d
Showing 1 changed file with 5 additions and 5 deletions.
@@ -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.

0 comments on commit 2bb6b74

Please sign in to comment.