Skip to content

Commit

Permalink
merge in improved replication lag
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 committed May 20, 2024
1 parent 1fe2e67 commit 50ea08a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lavinmq/replication/follower.cr
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ module LavinMQ

private def action_loop(socket = @lz4)
while action = @actions.receive?
sent_bytes = action.send(socket)
action.send(socket)
while action2 = @actions.try_receive?
sent_bytes += action2.send(socket)
action2.send(socket)
end
socket.flush
@sent_bytes += sent_bytes
end
rescue IO::Error
ensure
Expand Down

0 comments on commit 50ea08a

Please sign in to comment.