Skip to content

Commit

Permalink
Fsync before close
Browse files Browse the repository at this point in the history
  • Loading branch information
spuun committed Oct 17, 2023
1 parent 247049b commit 2615d2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lavinmq/replication/client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ module LavinMQ
@closed = true
@lz4.close
@socket.close
@files.each_value &.close
@files.each_value do |f|
f.fsync
f.close
end
end

class Error < Exception; end
Expand Down

0 comments on commit 2615d2a

Please sign in to comment.