summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2018-08-10 13:28:58 +0100
committerRobert Newson <rnewson@apache.org>2018-08-10 13:28:58 +0100
commit1e4f32f6302d5f606b5084404982ad769fcc59e2 (patch)
tree51b43fb4bd9ee663322176a57943db4cead0bbe0
parenta6bc72e76c56a1befa8675b06016ecda46ef3a2d (diff)
downloadcouchdb-1e4f32f6302d5f606b5084404982ad769fcc59e2.tar.gz
Ensure we only receive the correct DOWN message
relates to issue #1544.
-rw-r--r--src/couch_mrview/src/couch_mrview_show.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couch_mrview/src/couch_mrview_show.erl b/src/couch_mrview/src/couch_mrview_show.erl
index 2411c2ca2..e2c94bac3 100644
--- a/src/couch_mrview/src/couch_mrview_show.erl
+++ b/src/couch_mrview/src/couch_mrview_show.erl
@@ -370,8 +370,8 @@ json_req_obj(Req, Db) ->
% use a separate process because we're already in a receive loop,
% and json_req_obj calls fabric:get_db_info()
JRO = fun() -> exit(chttpd_external:json_req_obj(Req, Db)) end,
- spawn_monitor(JRO),
- receive {'DOWN', _, _, _, JsonReq} -> JsonReq end;
+ {Pid, Ref} = spawn_monitor(JRO),
+ receive {'DOWN', Ref, process, Pid, JsonReq} -> JsonReq end;
false ->
chttpd_external:json_req_obj(Req, Db)
end.