IO buffer lifetime fix, source buffer must stay alive until the file write completes.
This commit is contained in:
parent
344290fdf1
commit
a627df88c6
|
@ -63,7 +63,7 @@ public:
|
|||
m_buffer = Standalone<VectorRef<uint8_t>>(old.slice(size, old.size()));
|
||||
|
||||
// Write the old buffer to the underlying file and update the write offset
|
||||
Future<Void> r = holdWhile(old, m_file->write(old.begin(), size, m_writeOffset));
|
||||
Future<Void> r = uncancellable(holdWhile(old, m_file->write(old.begin(), size, m_writeOffset)));
|
||||
m_writeOffset += size;
|
||||
|
||||
return r;
|
||||
|
|
Loading…
Reference in New Issue