summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_variable_queue.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index 57fad266b4..a43578e492 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -1430,7 +1430,10 @@ determine_persist_to(#basic_message{
false -> Est = case is_binary(PropsBin) of
true -> BodySize + size(PropsBin);
false -> #'P_basic'{headers = Hs} = Props,
- length(Hs) * ?HEADER_GUESS_SIZE + BodySize
+ case Hs of
+ undefined -> 0;
+ _ -> length(Hs)
+ end * ?HEADER_GUESS_SIZE + BodySize
end,
case Est >= IndexMaxSize of
true -> msg_store;