Skip to content

Commit

Permalink
src: add fflush() to SnapshotData::ToFile()
Browse files Browse the repository at this point in the history
Refs: #46491 (comment)
PR-URL: #46531
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
addaleax authored and danielleadams committed Apr 3, 2023
1 parent 71249a6 commit 9567436
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node_snapshotable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ void SnapshotData::ToBlob(FILE* out) const {
size_t num_written = fwrite(w.sink.data(), w.sink.size(), 1, out);
CHECK_EQ(num_written, 1);
w.Debug("SnapshotData::ToBlob() Wrote %d bytes\n", written_total);
CHECK_EQ(fflush(out), 0);
}

bool SnapshotData::FromBlob(SnapshotData* out, FILE* in) {
Expand Down

0 comments on commit 9567436

Please sign in to comment.