summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_msg_store.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index be85091948..275a9127d1 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -1765,8 +1765,12 @@ build_index(Gatherer, Left, [],
build_index(Gatherer, Left, [File|Files], State) ->
ok = gatherer:fork(Gatherer),
ok = worker_pool:submit_async(
- fun () -> build_index_worker(Gatherer, State,
- Left, File, Files)
+ fun () ->
+ link(Gatherer),
+ ok = build_index_worker(Gatherer, State,
+ Left, File, Files),
+ unlink(Gatherer),
+ ok
end),
build_index(Gatherer, File, Files, State).