Skip to content

Commit 9567436

Browse files
addaleaxdanielleadams
authored andcommitted
src: add fflush() to SnapshotData::ToFile()
Refs: #46491 (comment) PR-URL: #46531 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 71249a6 commit 9567436

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node_snapshotable.cc

+1
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,7 @@ void SnapshotData::ToBlob(FILE* out) const {
860860
size_t num_written = fwrite(w.sink.data(), w.sink.size(), 1, out);
861861
CHECK_EQ(num_written, 1);
862862
w.Debug("SnapshotData::ToBlob() Wrote %d bytes\n", written_total);
863+
CHECK_EQ(fflush(out), 0);
863864
}
864865

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

0 commit comments

Comments
 (0)