Skip to content

Commit

Permalink
fixup! StreamQueue: only unmap unused segments
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Aug 9, 2023
1 parent 21e64b1 commit fb44bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lavinmq/queue/stream_queue.cr
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ module LavinMQ
end

private def unmap_unused_segments
used_segments = @consumers_lock.synchronize { @consumers.map &.segment }
used_segments = @consumers_lock.synchronize { @consumers.map &.as(Client::Channel::StreamConsumer).segment }
@msg_store_lock.synchronize do
stream_queue_msg_store.unmap_segments(except: used_segments)
end
Expand Down

0 comments on commit fb44bff

Please sign in to comment.