diff options
Diffstat (limited to 'src/couchdb/couch_ref_counter.erl')
-rw-r--r-- | src/couchdb/couch_ref_counter.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/couchdb/couch_ref_counter.erl b/src/couchdb/couch_ref_counter.erl index 4c824aa6..0fbec729 100644 --- a/src/couchdb/couch_ref_counter.erl +++ b/src/couchdb/couch_ref_counter.erl @@ -75,7 +75,9 @@ handle_cast({drop, Pid}, #srv{referrers=Referrers}=Srv) -> erlang:demonitor(MonRef, [flush]), dict:erase(Pid, Referrers); {ok, {MonRef, Num}} -> - dict:store(Pid, {MonRef, Num-1}, Referrers) + dict:store(Pid, {MonRef, Num-1}, Referrers); + error -> + Referrers end, maybe_close_async(Srv#srv{referrers=Referrers2}). |