Skip to content

Commit

Permalink
don't break stream loop if filename length is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Jul 1, 2023
1 parent 451d5ba commit 4fec6fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lavinmq/replication/client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ module LavinMQ
private def stream_changes(socket = @lz4)
loop do
filename_len = socket.read_bytes Int32, IO::ByteFormat::LittleEndian
break if filename_len.zero?
next if filename_len.zero?
filename = socket.read_string(filename_len)

len = socket.read_bytes Int64, IO::ByteFormat::LittleEndian
Expand Down

0 comments on commit 4fec6fd

Please sign in to comment.