summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_msg_file.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rabbit_msg_file.erl b/src/rabbit_msg_file.erl
index 1b9587fbde..ea50cc6432 100644
--- a/src/rabbit_msg_file.erl
+++ b/src/rabbit_msg_file.erl
@@ -118,6 +118,11 @@ read_next(FileHdl, Offset) ->
KO -> KO
end;
true -> %% all good, let's continue
+ %% Here we take option 5 from
+ %% http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:1569
+ %% in which we read the MsgId as a number, and
+ %% then convert it back to a binary in order to
+ %% work around bugs in Erlang's GC.
MsgIdSizeBits = MsgIdSize * 8,
case file:read(FileHdl, MsgIdSize) of
{ok, <<MsgIdNum:MsgIdSizeBits>>} ->