Skip to content

Commit 70459bc

Browse files
lint
1 parent db6f8dc commit 70459bc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lavinmq/queue/stream_queue_message_store.cr

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,10 @@ module LavinMQ
148148

149149
def cleanup_consumer_offsets
150150
offsets_to_save = Hash(String, Int64).new
151-
lowest_offset_in_stream, _seg, _pos = offset_at(@segments.first_key, 4u32) # handle
152-
@consumer_offset_positions.each do |ctag, pos|
153-
offset = last_offset_by_consumer_tag(ctag).not_nil!
154-
next if offset < lowest_offset_in_stream
155-
# Other scenarios to remove?
151+
lowest_offset_in_stream, _seg, _pos = offset_at(@segments.first_key, 4u32)
152+
@consumer_offset_positions.each do |ctag, _pos|
153+
offset = last_offset_by_consumer_tag(ctag)
154+
next if !offset || offset < lowest_offset_in_stream
156155
offsets_to_save[ctag] = offset
157156
end
158157

0 commit comments

Comments
 (0)