Skip to content

Commit

Permalink
start reading at pos=4 after IndexError in offset_at
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorerlingsson committed Jun 19, 2024
1 parent ec8c733 commit d52b6f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lavinmq/queue/stream_queue_message_store.cr
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module LavinMQ
offset = offset_from_headers(msg.properties.headers)
{offset, seg, pos}
rescue ex : IndexError # first segment can be empty if message size >= segment size
return offset_at(seg + 1, pos, true) unless retried
return offset_at(seg + 1, 4_u32, true) unless retried
raise ex
end

Expand Down

0 comments on commit d52b6f5

Please sign in to comment.