diff options
author | Robert Newson <rnewson@apache.org> | 2018-08-10 17:05:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-10 17:05:40 +0100 |
commit | 2a3b4e75ab34987508bf48a9742d3e62134afca3 (patch) | |
tree | 51b43fb4bd9ee663322176a57943db4cead0bbe0 | |
parent | a6bc72e76c56a1befa8675b06016ecda46ef3a2d (diff) | |
parent | 1e4f32f6302d5f606b5084404982ad769fcc59e2 (diff) | |
download | couchdb-2a3b4e75ab34987508bf48a9742d3e62134afca3.tar.gz |
Merge pull request #1553 from apache/ref-match-1544
Ensure we only receive the correct DOWN message
-rw-r--r-- | src/couch_mrview/src/couch_mrview_show.erl | 4 |
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. |