From 6fe4e1480b1bfb2a72ea64405a53a637222634af Mon Sep 17 00:00:00 2001 From: atlowChemi Date: Sun, 20 Aug 2023 08:40:47 +0300 Subject: [PATCH] EAGAIN comment --- lib/internal/fs/streams.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index b518b728d99704..e6acd517f7afad 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -395,6 +395,7 @@ WriteStream.prototype._construct = _construct; function writeAll(data, size, pos, cb, retries = 0) { this[kFs].write(this.fd, data, 0, size, pos, (er, bytesWritten, buffer) => { + // No data currently available and operation should be retried later. if (er?.code === 'EAGAIN') { er = null; bytesWritten = 0; @@ -423,6 +424,7 @@ function writeAll(data, size, pos, cb, retries = 0) { function writevAll(chunks, size, pos, cb, retries = 0) { this[kFs].writev(this.fd, chunks, this.pos, (er, bytesWritten, buffers) => { + // No data currently available and operation should be retried later. if (er?.code === 'EAGAIN') { er = null; bytesWritten = 0;