Skip to content

Commit

Permalink
fixup! Ref count usage of MFile, mmap only when in use
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Jan 1, 2025
1 parent 9d6cab8 commit 08e1e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lavinmq/mfile.cr
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class MFile < IO
# raise IO::Error.new("not memory mapped") if @buffer.null?
pos = @pos
len = Math.min(slice.size, @size - pos)
slice.copy_from(buffer + pos, len)
slice.copy_from(@buffer + pos, len)
@pos = pos + len
len
end
Expand Down

0 comments on commit 08e1e49

Please sign in to comment.