summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_runtime_parameters.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_runtime_parameters.erl b/src/rabbit_runtime_parameters.erl
index a04530f730..947875d627 100644
--- a/src/rabbit_runtime_parameters.erl
+++ b/src/rabbit_runtime_parameters.erl
@@ -141,8 +141,9 @@ lookup_missing(AppName, Key, Default) ->
rabbit_misc:execute_mnesia_transaction(
fun () ->
case mnesia:read(?TABLE, {AppName, Key}) of
- [] -> mnesia:write(?TABLE, c(AppName, Key, Default), write),
- Default;
+ [] -> Record = c(AppName, Key, Default),
+ mnesia:write(?TABLE, Record, write),
+ Record;
[R] -> R
end
end).